Announcement Announcement Module
Collapse
No announcement yet.
access diferent scopes from .jsp files Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • access diferent scopes from .jsp files

    Hi, i have a very simple question, i have the following view state, that is part of a subflow.
    When the state is entered i execute a pojo action, and want the result to be exposed to the .jsp.
    At first the .jsp coludn't acces the method-result (${expediente}) , as it was request scoped.
    Then i changed the scope to flow, and i works.
    What is the diference between diferents scope to the .jsp? And how do you access the diferent scopes in the jsp?

    Thanks!


    Code:
    <input-mapper>
    		<input-attribute name="idExpediente"/>
    		<input-attribute name="unidad"/>
    	</input-mapper>
    	
    	<start-state idref="verExpediente" />
    	
    	<view-state id="verExpediente" view="verExpediente">
    	
    		<entry-actions>
    				<bean-action bean="moverExpedienteFacade" method="getExpediente">
    					<method-arguments>
    						<argument expression = "flowScope.idExpediente" parameter-type="long"/>
    					</method-arguments>
    					<method-result name="expediente" scope="flow"/>
    				</bean-action>
    	    </entry-actions>
    		
    	</view-state>

  • #2
    You can access request scoped variables from jsp's.

    Problem is that you are putting a request scoped variable in the entry action, which get's lost during the redirect.

    Use Flash scope if you want to 'survive' the redirect, or do put the request scoped variable on the scope during render actions.

    Comment


    • #3
      I tried with different scopes an you are right!
      Thanks for you answer

      Comment

      Working...
      X