Web Flow View state identification parameter at client side
Moin Yadageri
Greenhorn
Joined: Jun 19, 2008
Posts: 10
posted
0
Hi,
I have a query regarding spring web flow.
Is there any way i can determine what view state the user is shown at client side. i mean is there any parameter that is present in the flow/request scope which i can use in my jsps to get the value of the view state.
I know it can be done by setting a property in the form bean with a value for each view and using that property in the JSPs, i was kind of thinking whether spring web flow provides that by default.
~ Moin
Hong Anderson
Ranch Hand
Joined: Jul 05, 2005
Posts: 1936
posted
0
You can use flowRequestContext, take look at RequestContext API.
SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Moin Yadageri
Greenhorn
Joined: Jun 19, 2008
Posts: 10
posted
0
requescontext would give me the view name in the action classes, i was looking at a view identifier which i can use in my JSP.
Something similar to flowExecutionKey (which i can access using ${flowExecutionKey}), i was looking for a property present in flow/request scope which can identify the view state rendered.
~ Moin
Hong Anderson
Ranch Hand
Joined: Jul 05, 2005
Posts: 1936
posted
0
You can use RequestContext.getCurrentState().getId(). Is that what you want?
Moin Yadageri
Greenhorn
Joined: Jun 19, 2008
Posts: 10
posted
0
i was able to identify the view state using the flowexecutionContext object in the jsp, ${flowExecutionContext.activeSession.state.id}.