Previous Document Next Document

Direct Reports Portlet

The Direct Reports portlet (Manager.portlet) accesses the Employee Information database to display a list of the employees who report directly to a particular manager. The Content URI property in the Property Editor window specifies the following file as the initial page flow file referenced by the Direct Reports portlet: /manager/Controller.jpf.

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

Controller File for the Direct Reports Page Flow

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

Components of the Controller File for the Direct Reports Page Flow 

Component
Function

begin Icon

Defines the employeeList() method that retrieves a list of the current manager's direct employees and passes control to EmployeeList.jsp.

The employeeList() method 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.

EmployeeList.jsp

Displays a list of the current manager's direct employees. First, it uses a netui-data:callPageFlow JSP page flow tag to call the employeeList() method defined in the controller file. Then, it uses the netui-data:repeater, netui-data:repeaterHeader, netui-data:repeaterItem, and netui:label JSP page flow tags to render the contents. For example:

<netui:form action="info">
<netui-data:callPageFlow method="employeeList" resultId="array"/>
<table border="0">
<netui-data:repeater dataSource="{pageContext.array}">
   <netui-data:repeaterHeader>
   <table border="0.5">
   <tr>
   <td><b>Employee Name</b></td>
   <td></td>
   <td><b>Employee Email</b></td>
   </tr>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
   <tr>
     <td>
     <netui:label value="{container.item.employeename}"/>
     </td>
     <td>
     <netui:label value="{container.item.email}"/>
     </td>
   </tr>
</netui-data:repeaterItem>
</netui-data:repeater>
</table>
</netui:form> 

To learn more about the JSP page flow tags listed here, see Designing User Interfaces in JSPs in the WebLogic Workshop Help.

info Action

Dummy action for form defined in EmployeeList.jsp. Passes control to EmployeeList.jsp.

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.


Previous Document Next Document