Java Reference
In-Depth Information
Figure 3.4: The contact list in a Display Tag table
3.4
Parameterized Links
Let's return to Stripes. We'll add the View and Delete links next to each
page).
trigger an action bean's event handler with the
beanclass=
and
event=
attributes. Now, the links in each row of the table views or deletes the
corresponding contact. How do we indicate the target contact for each
link? With parameters.
Adding Parameters to Links
Parameterized links are powerful because they provide additional infor-
mation that the action bean can then use. Stripes makes it easy to
add parameters to links: add a property on the action bean and an
<s:param> tag within <s:link> in the JSP. We can add as many param-
eters as we need; we indicate the
name=
and
value=
of each parameter
in the <s:param> tag. When the user clicks the link, Stripes binds
each parameter value to the corresponding property on the action bean
Search WWH ::
Custom Search