I may have missed a reply on this one, but it seems to
me that you only need to replace the one definition
and not both of them:

> 
> <definition name="menu.license"
> extends="menu.main">
> <putList name="flags">
> <add value="linknormal" />
> <add value="linkbold" />
> <add value="nolinkbold" />
> </definition>

And add the flags putList to the menu.main?

Does this not work?

-sandeep

--- iT meDic <[EMAIL PROTECTED]> wrote:
> Hi Cedric,
> 
> I understand what you mean however, i would like to
> use the mainLayout as 
> the definition and alter the submenu components (by
> adding flags)
> in my jsp page.
> 
> I want to be able to do this:
> 
> ><%@ taglib uri="/WEB-INF/tiles.tld" prefix="comp"
> %>
> ><comp:insert definition="mainLayout" flush="true" >
> >
> <comp:put definition=menu.link>(something like this)
> >   <comp:putList name="flags" >
> >     <comp:add value="linkbold" />
> >     <comp:add value="sep" />
> >   </comp:putList>
> >
> ></comp:insert>
> 
> Currently i am doing this to overcome the above
> problem:
> 
> in my defintions.xml
> 
> <definition name="mainLayout"
> path="/tutorial/layout/classicLayout.jsp">
> <put name="title" value="World Financial Online" />
> <put name="header"
> value="/tutorial/common/header.jsp" />
> <put name="footer"
> value="/tutorial/common/footer.jsp" />
> <put name="menu" value="menu.main" />
> </definition>
> 
> <definition name="menu.main"
> path="/layout/vboxLayout.jsp">
> <putList name="componentsList">
> <add value="menu.links" />
> </putList>
> </definition>
> 
> <definition name="menu.links"
> path="/common/submenu.jsp">
> <put name="title" value="Tutorial" />
> <putList name="items">
> <add value="Home" />
> <add value="Basic Page" />
> <add value="Licensing" />
> </putList>
> <putList name="links">
> <add value="/tutorial/index.jsp" />
> <add value="/tutorial/basicPage.jsp" />
> <add value="/tutorial/licensing.jsp" />
> </putList>
> </definition>
> 
> <definition name="menu.licenselayout"
> extends="menu.main" >
> <putList name="componentsList">
> <add value="menu.license" />
> </putList>
> </definition>
> 
> <definition name="menu.license"
> extends="menu.links">
> <putList name="flags">
> <add value="linknormal" />
> <add value="linkbold" />
> <add value="nolinkbold" />
> </definition>
> 
> So in the jsp page , i call the mainLayout just
> overload the name="menu" 
> with the value="menu.licenselayout".
> That way i am getting the right values bolded etc.,
> however, the problem is 
> i am building a framework for a site which has 10
> main menu items, with two 
> submenus(10 or more links per submenu) per menu
> item, as you can see that a 
> lot of redundant code i would have to include in my
> defintions file. Is 
> there a easier way to do this or am i on the right
> track on doing how i am 
> doing it?
> 
> Thank you in advance.
> it_medic
> 
> >From: Cedric Dumoulin <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: Re: Dynamic XML extended defintions
> >Date: Mon, 22 Oct 2001 14:56:31 +0200
> >
> >   Hello,
> >
> >   Yes you can.
> >
> >   In your jsp page, insert the definition you
> want, and pass it new or
> >overloaded parameters. These later will supersede
> the one defined in 
> >definition.
> >
> >i.e., write something like :
> ><%@ taglib uri="/WEB-INF/tiles.tld" prefix="comp"
> %>
> ><comp:insert definition="menu.links" flush="true" >
> >
> ><!-- i would like to add the below flags to the
> menu.links definition -->
> >   <comp:putList name="flags" >
> >     <comp:add value="linkbold" />
> >     <comp:add value="sep" />
> >   </comp:putList>
> >
> ></comp:insert>
> >
> >   The problem in your case is that you need to
> create a list with the 
> >exact size
> >as the others one.
> >   On my todo list there is a reload action that
> will allow to reload xml 
> >config
> >files without restarting web server. I need to find
> time to implement it.
> >   Also, you can change component context in an
> action, as proposed in 
> >another
> >mail reply.
> >
> >     Cedric
> >
> >iT meDic wrote:
> >
> > > Hi,
> > >
> > > I was wondering if it would be possible to
> overwrite the values(2 or 3
> > > levels down) defined in the definitions.xml file
> from a calling page. 
> >better
> > > explained with this example from the tutorial.
> > >
> > > <definition name="mainLayout"
> path="/tutorial/layout/classicLayout.jsp">
> > >   <put name="title" value="World Financial
> Online" />
> > >   <put name="header"
> value="/tutorial/common/header.jsp" />
> > >   <put name="footer"
> value="/tutorial/common/footer.jsp" />
> > >   <put name="menu" value="menu.main" />
> > >   </definition>
> > >
> > > <definition name="menu.main"
> path="/layout/vboxLayout.jsp">
> > > <putList name="componentsList">
> > >   <add value="menu.links" />
> > >   </putList>
> > >   </definition>
> > >
> > > <definition name="menu.links"
> path="/common/submenu.jsp">
> > >   <put name="title" value="Tutorial" />
> > > <putList name="items">
> > >   <add value="Home" />
> > >   <add value="Basic Page" />
> > >   </putList>
> > > <putList name="links">
> > >   <add value="/tutorial/index.jsp" />
> > >   <add value="/tutorial/basicPage.jsp" />
> > >   </putList>
> > >   </definition>
> > >
> > > Using the above as a reference is it possible to
> create a page and add
> > > flags for menu.links.
> > > eg :
> > >
> > > <%@ taglib uri="/WEB-INF/tiles.tld"
> prefix="comp" %>
> > > <comp:insert definition="mainLayout"
> flush="true" >
> > >
> > > <!-- i would like to add the below flags to the
> menu.links definition 
> >-->
> > >
> > > <comp:putList name="flags" >
> > > <comp:add value="linkbold" />
> > > <comp:add value="sep" />
> > > </comp:putList>
> > >
> > > </comp:insert>
> > >
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Reply via email to