-
1. Re: Null value sent by s:link in dataTable
smithbstl Jul 27, 2007 11:03 AM (in response to chawax)Most likely, you need to place your table inside of an <h:form> so the value is actually submitted.
-
2. Re: Null value sent by s:link in dataTable
christian.bauer Jul 27, 2007 11:07 AM (in response to chawax)s:link does NOT submit a form, it does NOT generate a JSF POSTback. Also, selectEmployee(emp) does not work that way, see the documentation re: EL enhancements in Seam. You want to look at the Hotel Booking example in Seam and see how this kind of thing is done.
-
3. Re: Null value sent by s:link in dataTable
chawax Jul 27, 2007 11:17 AM (in response to chawax)Well, that's what I did ... In the main.xhtml of Booking example (Seam 1.1.6), there is a <s:link> which works the same way I tried :
<a:outputPanel id="searchResults"> <div class="section"> <h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/> <h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}"> <h:column> <f:facet name="header">Name</f:facet> #{hot.name} </h:column> <h:column> <f:facet name="header">Address</f:facet> #{hot.address} </h:column> <h:column> <f:facet name="header">City, State</f:facet> #{hot.city}, #{hot.state}, #{hot.country} </h:column> <h:column> <f:facet name="header">Zip</f:facet> #{hot.zip} </h:column> <h:column> <f:facet name="header">Action</f:facet> <s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/> </h:column> </h:dataTable> <s:link value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/> </div> </a:outputPanel>
-
4. Re: Null value sent by s:link in dataTable
christian.bauer Jul 27, 2007 12:54 PM (in response to chawax)1. Use a newer Seam version, no idea if it works with the old one.
2. "hotels" needs to be a @DataModel, see HotelSearchingAction.java -
5. Re: Null value sent by s:link in dataTable
chawax Jul 30, 2007 6:05 AM (in response to chawax)I found where it comes from ...
My employeList seam component, which contains the employees list, was in CONVERSATION scope. So I think that the conversation was ended when running employeCrud component and of course it could not find the employee in the list ;)
I set my employeList component to SESSION scope and now it works better (other errors, but it goes further and this new error has nothing to see)