Results 1 to 3 of 3

Thread: Webflow 2 - Can't get request parameter

  1. #1

    Unhappy Webflow 2 - Can't get request parameter

    Hopefully someone will know the answer to this very simple question (simple if you know how webflow is storing and wrapping the request object).

    I have a request parameter that I want to use in an expression. It is passed the in from a page, but not stored in the formBean that is backing the page. This is because I don't care about it after it has been used. How can I get this parameter to pass it to an action class?
    ~ mARK aNDREWS ~

  2. #2
    Join Date
    Nov 2008
    Posts
    742

    Default

    If you're invoking your action within the transition away from your view-state, you can pass the request parameter in directly with EL:

    Code:
    <view-state id="whatever">
      <transition on="someEvent" to="anotherState">
        <evaluate expression="objectInScope.methodToInvoke(requestParameters.desiredRequestParameter)"/>
      </transition>
    
    </view-state>
    If you're invoking the method in a separate action-state, you can either use the same EL to get the requestParameter, or you can store it in some other scope (flash, flow) in the transition of your view-state, depending on your scoping needs.

  3. #3

    Red face It's ok, I wirked out what I was doing wrong!

    I did have the "requestParameters" call in my caode and this still wasn't working, but after a probper look at my flow config I realised what was going on.

    I was trying to access the parameter in the wrong view state. I needed it in the following view state, so I had to set up a variable using the "set" element and put it into flowScope.

    This seemed to do the job.

    But thanks for the quick response, nice to know there are a few people using it out there!
    ~ mARK aNDREWS ~

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
  •