[jboss-user] [JBoss Seam] - Page action pain, new stateless component instance?

grettke_spdr do-not-reply at jboss.com
Mon Jul 2 12:46:28 EDT 2007


Hi guys,

Question for you. I've got a RESTFul page whose sole purpose is to prepare another page. It has an action that only gets run once. As such, it is set up to immediately redirect to another page (since I don't want that action run every single time). Here is how it looks


  | <page view-id="/prepareInspectionRequest.xhtml"
  |           action="#{inspectionRequestAction.preparePage}">
  |         <param name="accountNumber"
  |                value="#{inspectionRequestAction.accountNumber}"/>
  |         <param name="userProfile"
  |                value="#{inspectionRequestAction.userProfile}"/>
  | 
  |         <navigation from-action="#{inspectionRequestAction.preparePage}">
  |             <rule if="#{inspectionRequestAction.validRequest}">
  |                 <redirect view-id="/inspectionRequest.xhtml"/>
  |             </rule>
  |             <rule if="#{not inspectionRequestAction.validRequest}">
  |                 <redirect view-id="/message.xhtml"/>
  |             </rule>
  |         </navigation>
  |     </page>
  | 

As written, when I step through inspectionRequestAction with the debugger, I evalute "this.hashCode()" within the setter for accountNumber and it evaluates to 29656067. When I step into preparePage and evalute hashCode I get 11498117. This is confusing to me because this is a stateless bean. The result of my setup is that my fields don't get populated correctly. 

What am I doing wrong here?

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

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



More information about the jboss-user mailing list