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

Examples of org.apache.empire.struts2.websample.web.SampleContext


    // ------- 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


    {
        if (!isServiceAvailable())
            return new Options(); // Webservice is note not available ... so do nothing

        if (departments == null)
            departments = EmployeeRecord.getDepartments(new SampleContext());

        return departments;
    }
View Full Code Here

    // ------- Action Construction -------

    public EmployeeDetailAction()
    {
        super(new EmployeeRecord(new SampleContext()), SessionPersistence.Key);

    }
View Full Code Here

    {
        if (!isServiceAvailable())
            return new Options(); // Webservice is note not available ... so do nothing

        if (departments == null)
            departments = EmployeeRecord.getDepartments(new SampleContext());

        return departments;
    }
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.SampleContext

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.