I'm not sure if i get it right, i still have a couple doubts. Take this definition:
<definition name=".PartyPlace" path="/layouts/layout.jsp"> ... <put name="menu" value="/chooseMenu.do"/> ... </definition> Naturally i got a login page, would i have to redirect the login (or just forward the login) to this "TilesAction" and then manipulate my definition and insert the real jsp page i want??? I have never heard of this "TilesAction" (haven`t been dealling with struts for long time), but is it possible to some post some bib reference (or web reference) where i can learn how to work with it??? If it`s easy, maybe a little piece of code would also work. Thanks, Leandro --- [EMAIL PROTECTED] escreveu: > think the best (and the most elegant) way to make > dynamic tiles is by > using TilesAction. This because this class has > knowledge of the use of > Tiles. > So write your TilesAction (it is similar to a plain > Action, except of some > more parameters in the "execute" method). In the > "execute" method put your > code that can distinguish between different users > and for each one forward > to a different JSP page, that will be your "real" > tile. > Obviously map your actions in struts-config.xml just > the same way as > normal actions. > Then put a definition like this (I am using your > example): > > <definition name=".PartyPlace" > path="/layouts/layout.jsp"> > <put name="title" value="PartyPlace"/> > <put name="header" value="/common/header.jsp"/> > <put name="menu" value="/common/menu.jsp"/> > <put name="error" > value="/functionalBlocks/errorHTMLcomponent.jsp"/> > <put name="pageComment" > value="/choosePageComment.do"/> > <put name="body" value="/chooseBody.do"/> > <put name="footer" value="/common/footer.jsp"/> > </definition> > > Hope it helps. > Ciao > Antonio > > P.S. In fact in this example a normal Action can be > used, but I suggest to > use TilesAction because that class can manipulate > the definition itself > (please people working on Struts, correct me if I am > wrong). > > Leandro Melo wrote: > > >Hi, > >i got a very ordinary problem. > >I need to provide diferent menus for diferent > people > >that are logged in the application. > >I don't know what i should do exactly to provide > this > >funcionality, because i don't really know what > Tiles > >allow me to do (i don't know it's potencial). > > > >I got the following base tiles definition in my > app. > ><definition name=".PartyPlace" > >path="/layouts/layout.jsp"> > > <put name="title" value="PartyPlace"/> > > <put name="header" value="/common/header.jsp"/> > > <put name="menu" value="/common/menu.jsp"/> > > <put name="error" > >value="/functionalBlocks/errorHTMLcomponent.jsp"/> > > <put name="pageComment" value="${pageComment}"/> > > <put name="body" value="${body}"/> > > <put name="footer" value="/common/footer.jsp"/> > ></definition> > > > >One thing i thought is to verify the user > permissions > >at log time, then, depending on the user i'd change > >the attribute "menu" of my definition to the page > >menu2.jsp or menu3.jsp, for example. Can (how) i do > >that??? > > > >I also thought on bulding 2 (or 3 or 4) BASE > >deifinitions and at log time i'd decide which base > >definition to use. Can i do that (how??)?? > > > >I'd appreciate if some show me some reference or > just > >some sample code on how to do that. > > > >Thansk, > >ltcmelo > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > _______________________________________________________ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]