This content has been marked as final.
Show 4 replies
-
1. Re: Why i get null,when i use seam extended EL
swd847 Oct 4, 2008 8:18 AM (in response to imake)s:link does not submit the form,
-
2. Re: Why i get null,when i use seam extended EL
imake Oct 4, 2008 2:08 PM (in response to imake)But why in the booking example this code can work:
<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}"> <h:column id="column1"> <f:facet id="NameFacet"name="header">Name</f:facet> #{hot.name} </h:column> <h:column id="column2"> <f:facet id="AddressFacet" name="header">Address</f:facet> #{hot.address} </h:column> <h:column id="column3"> <f:facet id="CityStateFacet" name="header">City, State</f:facet> #{hot.city}, #{hot.state}, #{hot.country} </h:column> <h:column id="column4"> <f:facet id="ZipFacet" name="header">Zip</f:facet> #{hot.zip} </h:column> <h:column id="column5"> <f:facet id="ActionFacet"name="header">Action</f:facet> <s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/> </h:column> </h:dataTable>
-
3. Re: Why i get null,when i use seam extended EL
magrawa Oct 25, 2008 9:38 PM (in response to imake)Hi,
Did you get the solution for your problem? I am also facing the same problem.
Thanks -
4. Re: Why i get null,when i use seam extended EL
utdrew Oct 30, 2008 11:08 PM (in response to imake)The hotel booking models' backing bean exposes 'hot' via the @DataModelSelection annotation. For your example, in your 'userList' bean you would ideally want to annotate the value returned by 'userList.resultList' with @DataModel and then have a field private User selectedUser annotated with @DataModelSelection.
ex:
..... @DataModel private List<User> searchResults; @DataModelSelection private User selectedUser; .....
That should solve your user delete issue. You should also change 'userList.resultList' to just reference your outjected data model i.e.
<rich:dataTable id="userList" value="#{searchResults}" var="user" rendered="#{not empty searchResults}">
When you call
#{UserDelete.userDelete(user)}
seam injects the value of selectedUser into your 'user' variable.
Drew