You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jonathan M Z <wo...@yahoo.com> on 2005/03/03 03:31:42 UTC

inserting and getting attributes

I have the following tiles definition file
<tiles-definitions>

    <definition name="common.default"
path="/layout/defaultLayout.jsp" >
    	<put name="header" value="/common/Top.jsp"/>
		<put name="menubar" value="/common/Side.jsp"/>
		<put name="nav" value="/common/nav.jsp"/>	
		<put name="footer" value="/common/footer.jsp"/>
		<put name="title" value="default title"
type="string"/>
	</definition>
	

</tiles-definitions>


in a.jsp I am trying to put title in:

<tiles:insert definition="common.default">
	<tiles:put name="body"
value="/calc/AssessmentCalcMain.jsp"/>
	<tiles:put name="nav" value="/common/nav.jsp" 
		/>
	<tiles:put name="title" type="string" value="my
title" />
</tiles:insert> 
in nav.jsp I have <tiles:getAsString name="title"
ignore="false"/>
when a.jsp is rendered I get:

[ServletException in:/common/nav.jsp] Error -
tag.getAsString : attribute 'title' not found in
context. Check tag syntax' 
What's wrong? 
thanks


	
		
__________________________________ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

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


RE: inserting and getting attributes

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Jonathan,

Check the list archives for this solution.   The trick had something to do
with attributes having to be nested to be seen in any included tiles.  To be
more clear, does nav.jsp actually do a tiles:insert or does it just try to
do the tiles:getAsString tag by itself?  I vaguely remember that you could
try and nest  the "put title" inside the other put and it MIGHT (AGAIN,
check the archives for a working solution) work.  I know I'm probably NOT
answering your question directly but I AM pointing you to where you can find
some related solutions.

Regards,
David

-----Original Message-----
From: Jonathan M Z [mailto:wo_shi_ni_ba_ba@yahoo.com]
Sent: Wednesday, March 02, 2005 9:32 PM
To: user@struts.apache.org
Subject: inserting and getting attributes


I have the following tiles definition file
<tiles-definitions>

    <definition name="common.default"
path="/layout/defaultLayout.jsp" >
    	<put name="header" value="/common/Top.jsp"/>
		<put name="menubar" value="/common/Side.jsp"/>
		<put name="nav" value="/common/nav.jsp"/>
		<put name="footer" value="/common/footer.jsp"/>
		<put name="title" value="default title"
type="string"/>
	</definition>


</tiles-definitions>


in a.jsp I am trying to put title in:

<tiles:insert definition="common.default">
	<tiles:put name="body"
value="/calc/AssessmentCalcMain.jsp"/>
	<tiles:put name="nav" value="/common/nav.jsp"
		/>
	<tiles:put name="title" type="string" value="my
title" />
</tiles:insert>
in nav.jsp I have <tiles:getAsString name="title"
ignore="false"/>
when a.jsp is rendered I get:

[ServletException in:/common/nav.jsp] Error -
tag.getAsString : attribute 'title' not found in
context. Check tag syntax'
What's wrong?
thanks




__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/

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


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