10 Replies Latest reply on Jan 8, 2007 5:18 AM by theute

    lossing of attributes in the request scope of jsf

    vadymkarpenko

      I am playing around with a simple jsf portlet and have stuck on the problem that managed bean with the scope request lose its attributes and they are not available at the result page. But when I run this application in tomcat lice web app everything is ok.
      Here is some more details :

       <navigation-rule>
       <from-view-id>/inputname.jsp</from-view-id>
       <navigation-case>
       <from-action>#{PersonBean.sayHi}</from-action>
       <from-outcome>ok</from-outcome>
       <to-view-id>/greeting.jsp</to-view-id>
       </navigation-case>
       </navigation-rule>
      
       <managed-bean>
       <managed-bean-name>PersonBean</managed-bean-name>
       <managed-bean-class>PersonBean</managed-bean-class>
       <managed-bean-scope>request</managed-bean-scope>
       </managed-bean>
      
      inputname.jsp main part:
       <h:form >
       <h:inputText id="userName" value="#{PersonBean.userName}"/>
       <h:commandButton id="submit" action="#{PersonBean.sayHi}" value="Say Hello" />
       </h:form>
      
      PersonBean.sayHi :
       public String sayHi(){
       userName+=" (hello from jsf core)";
       return "ok";
       }
      
      greetings.jsp main part:
      
       <h:outputText value="#{PersonBean.userName}" />!
      


      So when the scope request it works ok like web app but id doesn't when it is working like jsf portlet.

      Can anybody explain to me why ? Can this be a bug of jboss portal?