Results 1 to 2 of 2

Thread: String var assigned to view-state?

  1. #1
    Join Date
    Nov 2010
    Posts
    6

    Default String var assigned to view-state?

    Hello, am not sure if this is possible in webflow 2.2.1

    flow.xml (in red - does not work)
    Code:
    <view-state id="flowId1" model="flowModel1" view="/WEB-INF/templates/Flow_Form/form1.jsp">
            <set attribute="strVar" value="${'someStringVar'}" />	   	
    	<transition on="step1" to="step1Action" />
        </view-state>
    jsp
    Code:
    <h1>${strVar}</h1>
    Essentially, I'd like to assign a String var that will change value accross individual view-states, that is set in the flow.xml..

    Are there any other simple recommended approaches to this?

    Thanks

  2. #2
    Join Date
    Nov 2010
    Posts
    6

    Default

    got it..

    Code:
    <view-state id="flowId1" model="flowModel1" view="/WEB-INF/templates/Flow_Form/form1.jsp">
    	<on-entry>
    	        <evaluate expression="'someStringVar'" result="flowScope.strVar"/>
            </on-entry>   	
    	<transition on="step1" to="step1Action" />
    </view-state>

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •