0

I am new to spring webflows.I need to get text field value from jsp.and depending on text value need to redirect to appropriate jsp.I am unable to get the jsp value in webflow xml always showing blank "" value.

<input type="text" name="depositAmt"/>

through script using href am sending deposit amount value to webflow.xml

<input name="depositAmt" value="form.depositAmt"/>
<actionstate expression="form.getDepositAmt()>
<transition on="" to="payment">
<transition on-exception="" to="summary">
</actionstate>
Spartan
  • 1,167
  • 4
  • 20
  • 40
santosh
  • 1
  • 2

1 Answers1

0

There are a couple of ways you can achieve your goal. Either using a decision state to parse the text param and map the value to a predefined view, action, or end state. Or from the UI you can use javascript to change the eventId value passed in the URL based on the values inputted by the user.

Moreover, your syntax is filled with errors. If you were going to use a decision-state It should be

    <!-- <input name="depositAmt" value="form.depositAmt"/> You would only use the input tag for HTTP GET params -->

    <decision-state id="depositAmtCondition"> 
         <on-entry>
              <set name="depositAmt" value="expression="form.getDepositAmt()">
         </on entry>

         <if test="depositAmt.equals('someVal')" then="processForm" else="someOtherState" />

</decision-state> 

    <action-state id="processForm">     

        <transition on="someEvent" to="payment">           <!-- the 'on' attribute needs to be the eventId value passed in the HTTP GET URL params -->
        <transition on-exception="my.package.some.ClassException" to="summary">
    </action-state>

...

Also see this explanation for further explanation of how SWF works:

How to include a pop-up dialog box in subflow

Also for debugging purposes I recommend using logging like this:

Printing log from flow.xml

Community
  • 1
  • 1
Selwyn
  • 3,118
  • 1
  • 26
  • 33