Hi Dennis, do you know what is wrong in my code? When I use the "Not working code" I get an error (attached below) . At the end I have a working code but in two definitions and would like to bring them into one.
Zsolt Error message: [ServletException in:/templates/tabsLayout.jsp] Error - tag useAttribute : attribute 'selected' not found in context. Check tag syntax' <%-- Accessing attribute "selected" in a JSP file. --%> <tiles:useAttribute name="selected" classname="java.lang.String" scope="request" /> <!-- Not working Code (1 definition) --> <definition name="cb.project.layout.tracker" extends="cb.master.layout"> <put name="toolbar" value="cb.project.toolbar" /> <put name="selected" value="tracker" /> <put name="body" value="/bugs/main.jsp" /> </definition> <!-- Working Code (2 definitions) --> <definition name="cb.project.toolbar.tracker" extends="cb.project.toolbar"> <put name="selected" value="tracker" /> </definition> <definition name="cb.project.layout.tracker" extends="cb.master.layout"> <put name="toolbar" value="cb.project.toolbar.tracker" /> <put name="body" value="/bugs/main.jsp" /> </definition> On Tuesday 05 November 2002 22:20, you wrote: > Your original xml in your first post was correct. > > You can't put a "put" within a "put". > > You can however "put" another definition as the content of a put tag. > > If you need to extend the other definition, you can create the extension > definition, and then put that as the content of your final tile. > > On Tue, 2002-11-05 at 14:09, Zsolt Koppany wrote: > > when I try the example below I get the error: > > > > ERROR commons.digester.Digester - Parse Error at line 114 column -1: > > Element "put" does not allow "put" -- (#PCDATA) > > org.xml.sax.SAXParseException: Element "put" does not allow "put" -- > > (#PCDATA) > > > > EXAMPLE: > > > > <definition name="cb.project.layout.summary" extends="cb.master.layout"> > > <put name="toolbar" value="cb.project.toolbar.summary" > > type="definition" extends="cb.project.toolbar"> > > <put name="selected" value="summary" /> > > </put> > > <put name="body" value="/overview/proj_summary.jsp" /> > > </definition> > > > > On Tuesday 05 November 2002 18:08, Dennis Muhlestein wrote: > > > Yes, we use 1.1b2 and it works just fine. > > > You may need > > > <put name="toolbar" value="cb.project.toolbar.summary" > > > type="definintion"> > > > > > > note the type... but I saw someone say that it worked without it > > > before. -Dennis > > > > > > On Tue, 2002-11-05 at 09:38, Zsolt Koppany wrote: > > > > Hi tiles users, > > > > > > > > is it possible to bring the two definitions into one? I just want to > > > > define (overload) the variable "selected" that is needed by renderer > > > > of "cb.project.toolbar". > > > > > > > > <definition name="cb.project.toolbar.summary" > > > > extends="cb.project.toolbar"> <put name="selected" value="summary" /> > > > > </definition> > > > > > > > > <definition name="cb.project.layout.summary" > > > > extends="cb.master.layout"> <put name="toolbar" > > > > value="cb.project.toolbar.summary" /> <put name="body" > > > > value="/overview/proj_summary.jsp" /> </definition> > > > > > > > > > > > > -- > > > > To unsubscribe, e-mail: > > > > <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional > > > > commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>