Results 1 to 4 of 4

Thread: Flow requestParameters input mapping

  1. #1

    Default Flow requestParameters input mapping

    Folks,
    I should be able to do this at the top of my flow definition (SWF 2.0.8.RELEASE) to capture a request parameter into a flowScope variable, right?
    Code:
    <input name="command" value="flowScope.commandId" type="int"/>
    It doesn't work so I have to do this in a transition to capture the value:

    Code:
            
    <transition to="detail" on="detail">
        <set name="requestScope.commandId" value="requestParameters.command" type="int" />
        <evaluate expression="myExpressionHere.get(commandId)" result="flowScope.xyz"/>
    </transition>
    Is this a bug or am I mis-reading the documentation?

    Jon

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    If you would implement it correctly it works... Currently you are assigning the value of flowScope.commandId to a attribute named command.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    But if I change the request to

    Code:
    <input name="command" value="requestParemeters.commandId" type="int"/>
    I get some gnarly exception about the request parameters not being found. Thoughts?

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    input mapping only works at the start of a flow, not from a transition, instead of specifing requestParameters simply put 'commandId' webflow will try to detect it from somewhere.

    Next to that 'requestParemeters' isn't a valid name 'requestParameters' is.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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