java - Tiles2 group all the scripts inside a ¿definition? -
i'm using struts2+tiles2, , following. have baselayout, define menu, body, etc this:
<tiles:insertattribute name="menu" /> <tiles:insertattribute name="body" />
and in tiles.xml set them this:
<definition name="/index" extends="baselayout"> <put-attribute name="title" value="/public/menu.jsp" /> <put-attribute name="body" value="/public/index.jsp" /> </definition>
so, times have more complex layouts can use several jsp in body, , of jsp have inline scripts. know if there way can set these inline scripts appended on same place. example, define page head in baselayout, , have inline scripts appended head. hope there way this, find tiles documentation confusing , haven't discovered way this.
thanks!
in tiles1 i've done stuff this:
baselayout.jsp <html> <head> <tiles:getasstring name="appendedfiles"/> </head> <body> <tiles:insert attribute="menu"> <tiles:insert attribute="body"> </body> </html> tiles-defs.xml <definition name="baselayout" path="/struts/baselayout.jsp"> <put name="cssfiles"><![cdata[ <link href="file1.css" rel="stylesheet" type="text/css"> <link href="file2.css" rel="stylesheet" type="text/css"> ]]></put> </definition>
alternatively can put content separate jsp , "tiles:insertattribute" other content.
Comments
Post a Comment