Package org.apache.empire.struts2.websample.web.actions

Examples of org.apache.empire.struts2.websample.web.actions.EmployeeListAction$EmployeeInfo


   
    public Options getDepartments()
    {
        if (departments==null)
        {
            SampleDB db = getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.C_DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.C_NAME);
            cmd.orderBy(db.T_DEPARTMENTS.C_NAME.asc());
            departments = db.queryOptionList(cmd, getConnection());
        }
        return departments;
    }
View Full Code Here


        return doList();
    }

    public String doList()
    {
        SampleDB db = getDatabase();
        SampleDB.Employees EMP = db.T_EMPLOYEES;
        SampleDB.Departments DEP = db.T_DEPARTMENTS;
       
        DBCommand cmd = db.createCommand();
        cmd.select(EMP.C_EMPLOYEE_ID);
        cmd.select(C_FULL_NAME, EMP.C_GENDER, EMP.C_DATE_OF_BIRTH);
        cmd.select(C_DEPARTMENT);
        cmd.join  (DEP.C_DEPARTMENT_ID, EMP.C_DEPARTMENT_ID);
View Full Code Here

   
    @Override
    public Options getFieldOptions(DBColumn column)
    {
        if (column.equals(T.C_DEPARTMENT_ID)) {
            SampleDB db = (SampleDB)getDatabase();
            DBCommand cmd = db.createCommand();
            cmd.select(db.T_DEPARTMENTS.C_DEPARTMENT_ID);
            cmd.select(db.T_DEPARTMENTS.C_NAME);
            return db.queryOptionList(cmd, context.getConnection());
        }
        // base class implementation
        return super.getFieldOptions(column);
    }
View Full Code Here

    // ------- Action Construction -------
   
    public EmployeeDetailAction() {
        // Init Record Support Object
        DBTable table = getDatabase().T_EMPLOYEES;
        DBRecord record = new EmployeeRecord(this);
        // create a support Object
        recordSupport = new RecordActionSupport(this, table, record, SessionPersistence.Key);
    }
View Full Code Here

        return loginInfo;
    }

    public String doInit()
    {
        SampleUser user = getUser();
        if (user!=null)
            loginInfo.setName(user.getUserId());
        // Done
        return INPUT;
    }
View Full Code Here

            setActionError(SampleErrors.InvalidPassword);
            return INPUT;
        }
       
        // Login
        SampleUser user = new SampleUser(userID, userName);
        getSession().setUser(user);
        // Done
        return SUCCESS;
    }
View Full Code Here

        return loginInfo;
    }

    public String doInit()
    {
        SampleUser user = getSession().getUser();
        if (user != null)
            loginInfo.setName(user.getUserId());
       
        // check webservice availability!
        checkWebService();
       
        // Done
View Full Code Here

            setActionError(Errors.InvalidPassword);
            return INPUT;
        }

        // Login
        SampleUser user = new SampleUser(userID, userName);
        user.setLocale(new Locale(loginInfo.getLocale()));
        getSession().setUser(user);
        // Done
        return SUCCESS;
    }
View Full Code Here

        return loginInfo;
    }

    public String doInit()
    {
        SampleUser user = getSession().getUser();
        if (user != null)
            loginInfo.setName(user.getUserId());
       
        // check webservice availability!
        checkWebService();
       
        // Done
View Full Code Here

          setActionError(SampleErrors.InvalidPassword);
            return INPUT;
        }

        // Login
        SampleUser user = new SampleUser(userID, userName);
        user.setLocale(new Locale(loginInfo.getLocale()));
        getSession().setUser(user);
        // Done
        return SUCCESS;
    }
View Full Code Here

TOP

Related Classes of org.apache.empire.struts2.websample.web.actions.EmployeeListAction$EmployeeInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.