  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | - Re: Action argument is null when it shouldn 't be nul | - Re: Action argument is null when it shouldn 't be nul 2007-07-17 - By michaelcourcy
Back "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#4065164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4065164 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|
 |