Announcement Announcement Module
Collapse
No announcement yet.
Accessing Current State ID from JSP Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing Current State ID from JSP

    Hi Folks,

    I'm wondering if it is somehow possible to access the current state's name from the view (JSP).

    Right now what I'm doing to make this possible is following:
    Code:
       <render-actions>
    	<evaluate-action expression="${currentState.id}">
    	       <evaluation-result name="currentState" scope="flow"/>
    	</evaluate-action>
       </render-actions>
    That allows me to access my currentState variable from the view. The question is, is there a more direct way?


    Thanks,

    Klaus.

  • #2
    Try this:

    Code:
    <c:out value="${flowExecutionContext.activeSession.state.id}"/>
    The FlowExecutionContext is exposed to the views as "flowExecutionContext".

    Erwin

    Comment


    • #3
      Great!

      Thank you very much; that's exactly what i needed.

      Comment


      • #4
        Thank you, I'm looking for it too

        Comment


        • #5
          FlowExecutionContext is null

          Originally posted by klr8 View Post
          Try this:

          Code:
          <c:out value="${flowExecutionContext.activeSession.state.id}"/>
          The FlowExecutionContext is exposed to the views as "flowExecutionContext".

          Erwin
          I tried to get the state ID of the view State in my jsp using ${flowExecutionContext.activeSession.state.id}. It was giving me a blank output.

          When i tried to debug more I found out that ${flowExecutionContext} was empty or null. Can i get some pointer on this. At this moment, I am achiving this by setting parameters in web flow, but it is completely not acceptable to work with the redundancy.

          Please advice.

          Comment

          Working...
          X