Previous Document Next Document

Order Portlet

The Order portlet (Order.portlet) communicates with the Office Equipment Order Management system to enable employees to submit new office equipment orders or to view pending orders. The Content URI property in the Property Editor window specifies the following file as the initial page flow file referenced by the Order portlet: /order/Controller.jpf.

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

Controller File for the Order Page Flow

The following table describes each component in the controller file for the Order page flow.

Components of the Controller File for the Order Page Flow 

Component
Function

begin Icon

Passes control to the Equipment.jsp file.

Equipment.jsp

Provides a user interface to the Office Equipment Order Management system, enabling users to place an order or view the status of pending orders. It provides links to raise actions using the netui-anchor JSP page flow tag, including placeOrderStatus and checkStatus. For example:

<netui:anchor action="placeOrderPage">
   Place a New Order</netui:anchor></p>
<netui:anchor action="checkStatus">
   Check Order Staus</netui:anchor></p> 

placeOrderPage Action

Passes control to the placeOrder.jsp file.

placeOrder.jsp

Prompts the user for the ID of the item being ordered. It defines an input form to collect the item ID using the netui:form JSP page flow tag. It associates the contents of the form with the form bean defined by the placeOrder action. For example:

<netui:form action="/placeOrder" focus="ordid">

To learn more about the netui:form page flow tag, see Designing User Interfaces in JSPs in the WebLogic Workshop Help.

placeOrder Action

Retrieves the office equipment order and passes control to Success.jsp (or to Error.jsp in the event of an error). The placeOrder action defines a form bean with properties that correspond to the data fields in the order input form.

The placeOrder action uses m_WorkflowInvoker, an instance of the custom WorkflowInvoker control, to invoke the Order Requisition business process. The WorkflowInvoker custom control is described in detail in Building a Custom Control.

It also uses m_DBCtrl, an instance of the UsersDBControl database control, m_DBCtrl, to insert the order into the Employee Information database. The UsersDBControl database control is described in detail in Viewing Employee Information.

Success.jsp

Displays a message, indicating that the order was placed successfully, and prompts the user to check the status of all pending orders or click Done. It defines an input form using the netui:form JSP page flow tag and associates its contents with the form bean defined by the done action. For example:

<netui:form action="done">

If the user clicks Check Status, the checkStatus action is raised; if the user clicks Done, the done action is raised. For example:

<netui:button type="submit" 
   value="Check Order Status" action="checkStatus"></netui:button> 
<netui:imageButton value="Done"
src="/e2ePortalProject/framework/skins/default/images/done.gif">
</netui:imageButton> 

Error.jsp

Displays an error message in the event of an error.

checkStatus Action

Retrieves the employee ID and uses the JoinDB custom control to coordinate database queries to the Employee Information and Office Equipment Order Management databases. For example:

m_Array= m_JoinDB.joinDB(m_employeeid); 

It then passes control to the Status.jsp file.

The JoinDB custom control is described in detail in Building a Custom Control.

Status.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 checkStatusBusiness() 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-data:callPageFlow method="checkStatusBusiness" resultId="m_Array"/>
<netui-data:repeater dataSource="{pageContext.m_Array}">
<netui-data:repeaterHeader>
<table border="1">
<tr>
  <td><b>Order ID</b></td>
  <td><b>Status Description</b></td>
</tr>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<tr>
  <td>
  <netui:label value="{container.item.m_ordId}" />
  </td>
  <td>
  <netui:label value="{container.item.m_statusDesc}" />
  </td>
</tr>
</netui-data:repeaterItem>
<netui-data:repeaterFooter>
</table>
</netui-data:repeaterFooter>
</netui-data:repeater> 

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

DoneStatus Action

Returns control to the Equipment.jsp file.

Done Action

Returns control to the Equipment.jsp file.

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.

ErrorInvalid.jsp

Reprompts for information when user specifies an invalid entry.

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