#### Employee Portlet

The Employee portlet (Employee.portlet) accesses the Employee Information database to display an employee profile. The Content URI property in the Property Editor window specifies the following file as the page flow file referenced by the Employee portlet as follows: /employee/Controller.jpf.

The following figure shows the Employee page flow controller file, Controller.jpf, in the Flow View canvas of the Page Flow Designer.

Controller File for Employee Page Flow

The following table describes each component of the controller file for the Employee page flow.

Components of the Controller File for the Employee Page Flow

Component | Function
--- | ---
begin Icon | Retrieves the user name for the current user and passes control to Info.jsp (or to Error.jsp in the event of an error). The begin() method uses an instance of the UsersDBControl database control, m_DBCtrl, to retrieve the user name using the employee ID. For example:
    joindb.UsersDBControl.User user= null;
    .
    .
    .
    String empId=SubjectUtils.getUsername(sub);
    user = m_DBCtrl.lookupUser(empId);
The UsersDBControl database control is described in detail in Viewing Employee Information.
Info.jsp | Displays the employee profile for the current user. Defines an input form to collect the information about the employee using the netui:form JSP page flow tag. It associates the contents of the form with the form bean defined by the UsrInfo action. For example:
    <netui:form action="/UsrInfo" focus="employeename">
To learn more about the netui:form page flow tag, see Designing User Interfaces in JSPs in the WebLogic Workshop Help.
Error.jsp | Displays an error message in the event of an error.
UsrInfo Action | Retrieves the employee information for the current user using a form bean with properties that correspond to the data fields in the input form. It then passes control to Info.jsp (or to Error.jsp in the event of an error). The UsrInfo action uses an instance of the UsersDBControl database control, m_DBCtrl, to retrieve employee information from the Employee Information database. The UsersDBControl database control is described in detail in Viewing Employee Information.
logout Action | Passes control to the expired.jsp file. This action is triggered, when the user logs off the system, by the Log Out page flow controller file, described in Log Out Portlet.
expired.jsp | Displays a Data Expired message when the user logs off the system to indicate data within the current session has expired.
logIn Action | Passes control to the begin action of the Controller.jpf page flow. This action is triggered, when the user selects Log In Again from the Log Out portlet.