Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web Flow View state identification parameter at client side

 
Moin Yadageri
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use flowRequestContext, take look at RequestContext API.
 
Moin Yadageri
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use RequestContext.getCurrentState().getId(). Is that what you want?
 
Moin Yadageri
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i was able to identify the view state using the flowexecutionContext object in the jsp, ${flowExecutionContext.activeSession.state.id}.

Thanks.

~ Moin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic