[jboss-user] [JBoss Seam] - Re: CRUD screen

Delphi's Ghost do-not-reply at jboss.com
Tue May 8 12:33:16 EDT 2007

If you are talking about CRUD using the Seam Framework (EntityHome and all that) then I believe the contact list example uses that particular method of crud. 

If you are talking about writing your own set of CRUD pages, then there are a number of ways to do it. 

In the Issues example - inject the issueFinder bean into the issueEdit bean and get the selected item from the issueFinder. (seems messy to me)

- or - 

Use bijection to outject the selected item, and inject it into the edit bean

- or -

Use request parameters to pass the ID of the object to be edited to the editor page (best option for RESTful URLs) . The Seam blog uses this method.

- or - 

Use EL Enhancements to pass the object from the list page to the edit bean from within the datatable : i.e.

  |    <s:link value="Edit" action="#{personEditBean.editPerson(person)/>

where "person" is the var value in your datatable. You can see this type of example in the hotel booking app with the "selectHotel(hot)" function in the hotel listing page.  It starts the booking conversation and passes the hotel in using the "hot" variable from the datatable.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043983#4043983

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043983

More information about the jboss-user mailing list