You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by tr...@agilent.com on 2003/06/20 17:59:20 UTC

Using Struts tab layout

Hi, 

I'm a Struts newbie and this question may have been already addressed, but I can't seem to find anything relevant in the mail archives.
I'm trying to use the generic Struts tab layout to my web content and have various page definitions built on top of my tile modules. In the tabs application demo, each tab directly references a link to a JSP url. However, all of my pages are defined via the tiles XML definition file, it would be nice if I can reference these definitions in the tab list rather than the URL link (would mean a reworking of my design). Is there a way to do this or can someone recommend a solution? Any help would be appreciated.


Here's a scaled-down version of my definition file.

	<definition name=".aFGenericReportPage" path="/tiles/layout/aFReportLayout.jsp">
		<put name="title" value="SOME TITLE HERE"/>
		<put name="header" value="SOME HEADER HERE"/>
  		<put name="body"   value="SOME BODY HERE"/>
   	</definition>
	<definition name=".aFOTDRMeasReportPageOverview" extends=".aFGenericReportPage">
		<put name="title" value="OTDR Measurement Report"/>
		<put name="header" value="OTDRMeasReportHeader.def" type="definition"/>
  		<put name="body"   value="aFOTDRMeasBody.def" type="definition"/>
   	</definition>
	...
  	<!-- Page Definitions ends here -->
  	
	<!-- tabs page -->
  	<definition name="aFOTDRTabbedMeasBody.def" path="/tiles/layouts/aFTabsLayout.jsp">
		<put name="selectedIndex" value="0"/>
		<put name="parameterName" value="selected"/>
		<putList name="tabList">

			<!-- would like to do something like this, but not sure on how and 
					syntax -->
			<add value="Overview" link=".aFOTDRMeasReportPageOverview"/>
			<add value="Detailed" link=".aFOTDRMeasReportPageDetailed"/>

		</putList>
	</definition>
 	<definition name=".aFOTDRMeasReportPage">
		<put name="title" value="OTDR MeasurementReport"/>
		<put name="body" value="aFOTDRTabbedMeasBody.def"/>
	</definition>

Regards,
Trang

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Using Struts tab layout

Posted by Cedric Dumoulin <ce...@apache.org>.
  Hi,

  This kind of question should be asked in the struts user list. I 
forward the thread to struts-user.

    Cedric

trang_nguyen@agilent.com wrote:

>Hi, 
>
>I'm a Struts newbie and this question may have been already addressed, but I can't seem to find anything relevant in the mail archives.
>I'm trying to use the generic Struts tab layout to my web content and have various page definitions built on top of my tile modules. In the tabs application demo, each tab directly references a link to a JSP url. However, all of my pages are defined via the tiles XML definition file, it would be nice if I can reference these definitions in the tab list rather than the URL link (would mean a reworking of my design). Is there a way to do this or can someone recommend a solution? Any help would be appreciated.
>
>
>Here's a scaled-down version of my definition file.
>
>	<definition name=".aFGenericReportPage" path="/tiles/layout/aFReportLayout.jsp">
>		<put name="title" value="SOME TITLE HERE"/>
>		<put name="header" value="SOME HEADER HERE"/>
>  		<put name="body"   value="SOME BODY HERE"/>
>   	</definition>
>	<definition name=".aFOTDRMeasReportPageOverview" extends=".aFGenericReportPage">
>		<put name="title" value="OTDR Measurement Report"/>
>		<put name="header" value="OTDRMeasReportHeader.def" type="definition"/>
>  		<put name="body"   value="aFOTDRMeasBody.def" type="definition"/>
>   	</definition>
>	...
>  	<!-- Page Definitions ends here -->
>  	
>	<!-- tabs page -->
>  	<definition name="aFOTDRTabbedMeasBody.def" path="/tiles/layouts/aFTabsLayout.jsp">
>		<put name="selectedIndex" value="0"/>
>		<put name="parameterName" value="selected"/>
>		<putList name="tabList">
>
>			<!-- would like to do something like this, but not sure on how and 
>					syntax -->
>			<add value="Overview" link=".aFOTDRMeasReportPageOverview"/>
>			<add value="Detailed" link=".aFOTDRMeasReportPageDetailed"/>
>
>		</putList>
>	</definition>
> 	<definition name=".aFOTDRMeasReportPage">
>		<put name="title" value="OTDR MeasurementReport"/>
>		<put name="body" value="aFOTDRTabbedMeasBody.def"/>
>	</definition>
>
>Regards,
>Trang
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org