Affan Qureshi wrote:
Definitions declared in the configuration file belong to the definition factory which is in the application scope. You can create yourself and store definitions in any jsp scope like a regular java bean. You insert it with <tiles:insert name="defName" scope="page|request|session|application" />.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?
In the case of nested tiles, there is one different context for each nested tiles.
Cedric
Affan
----- Original Message -----
From: "Cedric Dumoulin" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 9:11 PM
Subject: Re: [TILES] Dynamically overriding Tiles Definitions
Hi,Action
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
(java.util.List)context.getAttribute("tabList");class but do not get an Attribute against the name, instead I get a null.
ComponentContext context = ComponentContext.getContext(request);
java.util.List list =
getIs it because it is request scoped? Can i make it session-scoped? Also I
Tilesan empty iterator when I try to traverse the list of attributes in the
twoContext.
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" <[EMAIL PROTECTED]>
To: "struts-user" <[EMAIL PROTECTED]>
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
layout: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
run<definition name="templateview.default" path="/webpages/layout.jsp">and
<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
displays it as just two panels. This problem can be reproduced if you
forwardingthe tiles-documentation example and go toyou
http://localhost:8080/tiles-documentation/examples/tabs.jsp. Now here if
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
<mailto:[EMAIL PROTECTED]>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:[EMAIL PROTECTED]>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>--
To unsubscribe, e-mail:
For additional commands, e-mail:<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

