Next, you must specify which record will be displayed on
the updatecustomer.jsp page. To send this information to that page,
you specify an HTTP request parameter for the link you just added.
HTTP request parameters are name-value pairs of plain text that are
sent over the Internet by way of the HTTP protocol. Request parameters
are an efficient way to send and receive simple data between programs
within an application.
- Click directly on the link icon of the link control you
just added to the {LASTNAME} control.
The
link icon itself,
,
not the text control, must be selected before you can continue. You
have the link selected correctly if it is lightly shaded and the selection
box is surrounding the link icon and the text control. Do not double
click the link icon.
- Without moving the selection away from the link icon, open
the Properties view.
The Properties view is usually
at the bottom of the workbench. If you can't find the Properties view,
click .
- In the Properties view, click the Parameter tab,
directly below the hx:outputLinkEx tab.
If you can't find the Parameter tab,
be sure you have clicked directly on the icon to select it.
- Click Add Parameter. A
new parameter named Name0 is added to the list of
parameters.
- Click the cell holding Name0 and replace
the name with the following text as the new name of the parameter:
CID
- Click the cell holding Value0 to highlight
it.
- Click the
Select Page Data Object button. The Select Page Data Object window opens.
- Under Data Objects, expand Data.
- Expand customers - Customer[].
- Click CUSTOMERID - CUSTOMERID.
The Select Page Data Object window looks like this:
- Click OK.
- Save and close the page.
Now, the value of the CID parameter for
the link is bound to the value of the customer_id field. When the
user clicks the link, the runtime code invokes the file updatecustomer.jsp
and makes the customer ID number available to the onPreRender function
of the related JSF handler.
In the next lesson, you will create
the web page for the file updatecustomer.jsp, and later, you will
set up the JSF handler to receive the parameter and to show only the
customer with that ID number.