yglodt
yglodt

Reputation: 14551

How can I get the current view-state id of a Web Flow inside a JSP?

I use the same jsp for two different view-states in my WebFlow.

I do not want to duplicate the jsp for the 2 view-states, because 99% of the code would be common.

I would prefer to get the id (name) of the view-state to use it in EL for some basic if / choose logic.

How can I get the id (name) of a view-state in a jsp ?

Upvotes: 2

Views: 3214

Answers (2)

yglodt
yglodt

Reputation: 14551

The solution to get the name (id) of the current view-state is:

${flowRequestContext.currentState.id}

Upvotes: 4

rootkit
rootkit

Reputation: 2165

Try

<c:out value="${flowExecutionContext.activeSession.state.id}"/>

Upvotes: 0

Related Questions