Announcement Announcement Module
Collapse
No announcement yet.
String var assigned to view-state? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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>

    Comment

    Working...
    X