myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Very Basic List and Crud -- how to link JSF forms
Date Thu, 12 Mar 2009 03:42:24 GMT
Hello All,

Probably the most basic web pattern is to list a series of objects (Employees, say) and then
be able to click on one of them and edit it.

Ie. Two forms, List and Update.  The List form contains a list of Employees, and a link for
each employee.  When a user clicks on the link for employee Fred (say) the second Update form
is called that just displays Fred's details and allows them to be edited.  No AJAX, just very
basic HTML patterns.

The first problem is how to set up the link in the List form to pass "Fred" to the update
form.  This would be a get, not a post.  So then how to retrieve the value within the Update
form.  Does one really need to poke at HtmlRequest?

The second, more serious problem, is that the first time a form is displayed there is no way
to run an action.  So when the Master form is called from the List form it cannot display
Fred's details.

I'm hoping not to have to use dirty tricks to do such a basic thing.  (One dirty trick would
be to put most of the application into one huge form and somehow hide various bits at different

<rant>None of the four JSF books that I have cover basic issues like this.  And Facelets
cannot address the problem that JSF's seemingly broken event model was designed around JSPs.
 Is JSF real, or does one need to go the whole ADF hog to do basic things?  ASP.Net seems
much, much easier to use.</rant>

All help much appreciated.  If someone has a canned example of basic List + Crud that would
be most helpful.


Dr Anthony Berglas,       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.

View raw message