Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Help - Need api access to the webflow "view" attribute expression in java servlet filter

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope this is a proper question for this forum. I've posted this on Spring Webflow forum, too, but this forum has been much more active and helpful to me in the past.

We employ some external redirect requests in our webflow navigation - e.g., something like:



We also use a small servlet filter chain to inspect the requests that occur for security reasons. I've been able to write code (Java) in this filter to get the FlowExecution object, along with the current flow state in order to get the state id. This is documented in a few places on the web and seems to work fine. This is basically what I did:



However, I want to get the expression for the "view" attribute in the flow state so I can parse and know that this current request is a redirect, but have not been able to find the api path that will give it to me. During debug, I look at the FlowSession object (from flowExecution.getActiveSession()), and down in the bowels of that object I see the ViewFactory for each state, and drill down even further to see the targetExpression value, which is what i believe I want. But it doesn't seem to be available through the API, at least not how I have tried to get it.

The attributes map in the State object does include the "model" attribute if used in the flow definition xml, but not the "view" attribute.

Can someone tell me what I'm doing wrong, or make a suggestion as to how I can retrieve the "view" expression value for a flow state? Any help would be greatly appreciated. Thank you!
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic