Announcement Announcement Module
No announcement yet.
Webflow 2 - Can't get request parameter Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

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

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

    <view-state id="whatever">
      <transition on="someEvent" to="anotherState">
        <evaluate expression="objectInScope.methodToInvoke(requestParameters.desiredRequestParameter)"/>
    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
      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!