18.2.3 Creating the page layout
Now that you have located and explored the Web service, you will add it to the page, then prepare the page for the Web service components by modifying the default values and adding the correct components.
1. In the TrafficConditionView.jsp file, replace the default text with Enter a highway number to get traffic conditions:
2. From the Faces Components palette, drag and drop a Panel - Group Box below the text.
3. In the Select pop-up (Figure 18-26), select List and click OK.
Figure 18-26 Select Type
Now you will add the input and output components and the action button for the Web service to the Faces JSP.
4. In the Page Data view, expand catrafficporttypeproxyGetTrafficParamBean and select hwynums. Drag and drop it into the Panel - Group Box.
5. In the Insert Web Service dialog, make sure that the Control Type selected is Input Field (Figure 18-27).
Figure 18-27 The insert Web service dialog
6. Click Finish.
7. Bind the doCatrafficporttypeproxyGetTrafficAction to the Submit button by dragging and dropping the action onto the button (Figure 18-28).
Figure 18-28 Binding the action to the Submit button
8. Insert a break after the Submit button.
9. The catrafficporttypeproxyGetTrafficResultBean(String) will return the result from the Web service. Drag and drop it below the break that was just inserted. The page layout should look like Figure 18-29:
10. In the Insert Web Service dialog, make sure that the Control Type selected is Output Field. Change the label to Traffic Report:, then click Finish.
Figure 18-29 The page layout for the Web service client portlet
11. Save and close the file.
ibm.com/redbooks