"grettke_spdr" wrote : This code from the sample works just fine though:
|
| <s:link id="viewHotel" value="View Hotel"
action="#{hotelBooking.selectHotel(hot)}"/>
Yes I ran into this problem until I unserstand that a link is a link and a post is a post
;)
Wich means that using such expression
| <s:link id="viewHotel" value="View Hotel"
action="#{hotelBooking.selectHotel(hot)}"/>
|
make sens only if the #{hotelBookings} collection exist in one the available scope.
in you watch carefully the Scope of #{hotelBookings} in the seam-books example, it's a
session scope.
It's really consistent, as you can engage many convesations inside a session. Session
is the container of many conversations. Engaging many conversations without a session that
reference them don't make sens.
When you use s:link with a one argument method you're passing a reference to an obect
but you don't post this object.
But I agree on the fact that it would be more helpful if we could have an error message
like : this object could not be found in any scopes (similar to struts) than having the
method executed with a null argument.
I can't figure out in wich situation a developper would write
| <s:link id="viewHotel" value="View Hotel"
action="#{hotelBooking.selectHotel(hot)}"/>
|
and expecting "hot" to be null !
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065164#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...