struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robinbajaj <>
Subject struts-menu + tiles 1.x + struts 1.x issue
Date Sun, 26 Aug 2007 05:10:45 GMT


I have a web-app using Struts1.x + tiles 1.x.

I am using Struts-menu which is working fine individually (without tiles). I
need advice to insert this Struts-menu based page in my tiles definition. 
( I have followed this thread
Struts+tiles integration thread  which provides a starting point for
struts-menu + tiles integration. 

==My requirement is:===
When I click on the any tab of the struts-menu, the corresponding tab's
contents (a tile definition from tiles-defs.xml) should show up below it
(along with rest of the layout of the site like header, footer, etc) 

===My problem :===
But currently when I click on any struts-menu tab, it shows the content
below it, but moves out of the site 's remaining layout i.e header, footer,
sidebar etc. are missing.  I know the reason is how I have defined my tiles
in tiles-defs.xml, but I need suggestion to re-arrange my tiles so that when
the tab is clicked the contents are shown below it , and the struts-menu
component as a whole stays in the remaining sitelayout (ie it shows header,
footer tiles surrounding it..)

My tiles layout (tiles-defs.xml) is as following:

Basically i have header, footer, sidebar, navigation bar in my
"base.definition" which is defined
in siteLayout.jsp.  Clicking on the appropriate links in the sidebar, I
forward to appropriate tiles-definitions (which point to jsp based forms in
the body section) like "page.welcome" points to index.jsp etc. 

As I said above, my problem occurs when I click on any tab of the
struts-menu component.

My relevant struts-menu menu-config.xml contents are...

When I click on first menu on my struts-menu it points to this definition in
my menu-config.xml file ----------------
<Menu name="ClinicalPresentationMenu" title="Clinical Presentation"
which invokes the following action mapping is called from my
struts-config.xml file 

which looks for my tile-def named "roster.ClinicalPresentation" in my

which has the following related definitions...
	<definition name="page.patientRoster" extends="base.definition">
		<put name="title" value="Patient Roster" />
		<put name="body" value="patientRosterBody.definition" type="definition"/>

	<definition name="patientRosterBody.definition"
		<put name="roster_header" value="/jsp/tabbedMenu.jsp" />
		<put name="roster_body" value="/jsp/clinicalPresentation.jsp" />
	<definition name="roster.ClinicalPresentation"
		<put name="roster_body" value="/jsp/clinicalPresentation.jsp" />

Since my tile-def named "roster.ClinicalPresentation" extends
I just shows the contents of "patientRosterBody.definition" which is

I need to somehow link my tab contents with a tile definition that extends
"base.definition" (which
includes header, footer, sidebar etc.) How can i do that ??

Any suggestions are most welcome,

(In case its helpful, there's some further explanation about the
tiles-defs.xml contents)

Basically my "page.patientRoster" extends my base.definition and puts
another definition
"patientRosterBody.definition" in the <body>. This
"patientRosterBody.definition" is defined 
in PatientRoster_new_layout.jsp which is basically a table with two rows, 
the top row has <tiles:insert attribute="roster_header"/> 
bottom row has   <tiles:insert attribute="roster_body"/>.

"roster_header" is my tabbedMenu.jsp (containing Struts-menu) and bottom row
"roster_body" is supposed to show the jsp content, depending upon which tab
is clicked in the roster_header (i.e struts-menu) . I intend to have
tile-defs corresponding to all my struts-menu tabs
pointing the tab contents (different jsps).

In this case, I have "roster.ClinicalPresentation" which inserts
"jsp/clinicalPresentation.jsp" as "roster_body".

My "/jsp/tabbedMenu.jsp" content are here:

My "/jsp/PatientRoster_new_layout.jsp" contents are here:

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message