struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Affan Qureshi" <quere...@etilize.com>
Subject Re: [TILES] Dynamically overriding Tiles Definitions
Date Wed, 06 Nov 2002 04:10:25 GMT
Thanks. I got the attributes form the Tiles Context but only on the JSP that
had a <tiles:insert>. Can I somehow make the Tiles Definition session
scoped? Also in case of nested Tiles, will there be multiple Tile Contexts?

Affan
----- Original Message -----
From: "Cedric Dumoulin" <cedric@apache.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Tuesday, November 05, 2002 9:11 PM
Subject: Re: [TILES] Dynamically overriding Tiles Definitions


>
>   Hi,
>
>   Where is declared your action ? To be able to retrieve the tiles
> context, there should be a tiles context. There is a tiles context only
> if you insert an Tiles, or do a forward from an action to a definition.
> In this later case, the context is created after the action.
>
>           Cedric
>
> Affan Qureshi wrote:
>
> >I want to modify the Attributes in a tiles Definition from my Action
> >classes. Is this possible? I have tried the following code inside the
Action
> >class but do not get an Attribute against the name, instead I get a null.
> >
> >    ComponentContext context = ComponentContext.getContext(request);
> >    java.util.List list =
(java.util.List)context.getAttribute("tabList");
> >
> >Is it because it is request scoped? Can i make it session-scoped? Also I
get
> >an empty iterator when I try to traverse the list of attributes in the
Tiles
> >Context.
> >
> >    Iterator iter = context.getAttributeNames();
> >    System.out.println(iter.next())
> >    System.out.print("Printing Attrbutes:");
> >    while(iter.hasNext())
> >    {
> >        System.out.println("Attribute"+ ((String)iter.next()));
> >    }
> >
> >My tiles definition is given below. Thanks a lot.
> >
> >----- Original Message -----
> >From: "Affan Qureshi" <quereshi@etilize.com>
> >To: "struts-user" <struts-user@jakarta.apache.org>
> >Sent: Tuesday, November 05, 2002 1:26 PM
> >Subject: Nested layouts (Panels inside Tabs)
> >
> >
> >
> >
> >
> >>I have a Tabs Layout setup and inside a tab I have another layout with
two
> >>panels(menu and content). This is my definition:
> >>
> >><definition name="index.page" path="/webpages/layouts/tabsLayout.jsp" >
> >>     <put name="header" value="/webpages/header.jsp"/>
> >>     <put name="footer" value="/webpages/footer.jsp" />dfs
> >>     <put name="selectedIndex" value="0" />s
> >>     <put name="parameterName" value="selected" />
> >>     <putList name="tabList" >
> >>         <item value="Home"  link="/webpages/home.jsp"
> >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >>         <item value="Template"  link="/webpages/template.jsp"
> >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >>         <item value="Search" link="/webpages/search.jsp"
> >>classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
> >> </putList>
> >></definition>
> >>
> >>The link to "Template" i.e the template.jsp file follows a simple
layout:
> >>
> >><definition name="templateview.default" path="/webpages/layout.jsp">
> >>    <put name="menu" value="/webpages/tiles/categoryTile.jsp"/>
> >>    <put name="body" value="/webpages/tiles/templateTile.jsp"/>
> >></definition>
> >>
> >>The problem is that when I click on any link inside one of the panels in
> >>templateTile.jsp or any other file, it breaks out of the Tabular layout
> >>
> >>
> >and
> >
> >
> >>displays it as just two panels. This problem can be reproduced if you
run
> >>the tiles-documentation example and go to
> >>http://localhost:8080/tiles-documentation/examples/tabs.jsp. Now here if
> >>
> >>
> >you
> >
> >
> >>click on any link in the menu the page will open outside the tab layout.
> >>
> >>The hyperlinks in my "Menu" panel point to Action classes. I am
forwarding
> >>requests from the Action classes to Tiles Definitions.
> >>
> >>What should I do to tackle this problem?
> >>
> >>Also can anyone guide me to a resource for Nested Tabs?
> >>
> >>Thanks for your time.
> >>
> >>
> >
> >
> >--
> >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>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message