Announcement Announcement Module
Collapse
No announcement yet.
Add Layout param in Flow configuration on-render Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add Layout param in Flow configuration on-render

    In whole application I'm using adding context param "css" and "js" via setting it inside of @Controller to Map<String, Object> argument

    How can I transform this code:
    Code:
    	@RequestMapping("/")
    	public String login(Map<String, Object> map) {
    		map.put( "css", new String[]{"first_css", "second_css"} );
    		return "static/index";
    	}
    to static XML configuration in *-flow.xml ?

    You can extend on this snippet:

    Code:
    	<view-state id="index" model="dataModel" view="static/home">
    		<on-render>
    			<render fragments="body" />
    		</on-render>
    
    		<transition on="register" to="register" />
    	</view-state>
    P.S.: Note that String array (String[]) type is required
    P.S.S.: Naming is handled correctly, view is resolved OK, I just need to set the value of context params

  • #2
    Oh, this is solution, but not very nice.
    Isn't there something better?

    Code:
    <evaluate expression="new String[]{'first_css','second_css'}" result="requestScope.css"/>

    Comment

    Working...
    X