I was wondering how to d something that I would think would be a common
situation, yet I'm not finding any examples at the moment...
scenario:... list of employees. You want to be able to click on one of
the employees and go to an "editEmployee" backing bean method that
would retrieve the employee based on the id of the employee in the list.
I'm used to doing this with a simple link John Doe <a href="" /setUpForEdit?employeeID=4355">Edit</a>
With JSF I'm not so sure about how to do this. My JSF
book mentions briefly about passing in f:param in commandLink but
doesn't show how to retrieve this param.
As a side note I find this very interesting, I was testing by using a
DataTable and providing a commandLink next to each employee for each
row...
<h:commandLink value="Edit" action="">
<f:param name="empID" value="#{emp.id}"/>
</h:commandLink>
One of the odd/interesting things is that when I cycle through and
print out the Request parameters I noticed that I'm getting a single
parameter (assuming a map) that actually has the Employee info that I'm
concerned with (2nd one):
8/26/05 02:28:55 PM DEBUG net.reumann.Employee editAction - param = [EMAIL PROTECTED]
08/26/05 02:28:55 PM DEBUG net.reumann.Employee editAction - param = id: 3, name: Rachel, age: 26
08/26/05 02:28:55 PM DEBUG net.reumann.Employee editAction - param = /employees.jsp
That second enry *does* correspond to the button I clicked but not sure
how I'm supposed to get a handle to the id (actually I'm not even sure
how the heck that got into the request based on the commandLink I set
up)?
Also the f:param "empID" is *not* seen as a request parameter when I loop over them.
What is the typical procedure for providing a link or button to click
on that isn't part of a form but should fire off an action method that
will look up something based on parameter(s) ?
- Dealing with links/buttons to fire off an actio... Rick Reumann
- RE: Dealing with links/buttons to fire off... Patel, Hitesh \(Exchange\)
- Re: Dealing with links/buttons to fire... Mike Kienenberger
- Re: Dealing with links/buttons to ... Rick Reumann
- Re: Dealing with links/buttons... Mike Kienenberger
- Re: Dealing with links/buttons to fire... Rick Reumann
- Re: Dealing with links/buttons to fire off... Dennis Byrne
- Re: Dealing with links/buttons to fire... Mike Kienenberger
- MyFacesGenericPortlet Patrick Dalla Bernardina
- Re: Dealing with links/buttons to fire off... Dennis Byrne
- RE: Dealing with links/buttons to fire off... CONNER, BRENDAN \(SBCSI\)

