Announcement Announcement Module
Collapse
No announcement yet.
How to add flow scope variable in the flow xml from Java class Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to add flow scope variable in the flow xml from Java class

    Hello Folks,

    I want to create a flow scope variable like this
    Code:
    <var name="dataVO" class="com.myProject.VO.dataVO"/>
    in Java. I cannot have this variable defined in the flow xml because "class" would be dynamic depending upon the request. So whenever this flow is requested I am evaluating an expression which would be setting/creating the above variable and in the flow I would be referring this var in the "model" attribute of <view> like this
    Code:
    <view-state id="form" model="dataVO">
    and in JSP the "modelAttribute" would also point to the "dataVO".

    I read about the VarModel class which is a bean used for setting the variables by the Flow. I am not sure how to add this variable to my current flow
    Code:
    requestContext.getActiveFlow()
    . Any help is appreciated.
Working...
X