I've been debugging the tiles code and have made some progress.

 

I have four tiles that make up a single html page. The tile at the top
(header) has three attributes and the tile in the middle (body, the one that
is using an attribute for the first time) is in the middle and has one.

 

When I run through the InsertAttributeTag for the header I can see all of
the attributes listed below, e.g., logoutErrorKey, titleKey, body, etc. in
the attributes for evaluatingContext. When I run through the same code for
the JSP in the middle, attributes is null. Any ideas why this may be
happening?

 

  _____  

From: Hehl, Thomas 
Sent: Monday, August 25, 2008 2:33 PM
To: [email protected]
Subject: Missing key

 

I've been using tiles for about two years, but only on an app I inherited
from someone else, so I'm still kinda a newbie.

 

I'm trying to extend a definition in my tiles so I can re-use an existing
JSP and just add one error message. Here's the appropriate tiles entries:

 

 

  <definition name=".logout" extends=".baseDef">

      <put-attribute name="logoutErrorKey"      value="" />

      <put-attribute name="titleKey"            value="logout.title" />

      <put-attribute name="welcomeKey"          value="logout.welcome"/>

      <put-attribute name="menu"
value="/WEB-INF/view/logout_Menu.jsp" />

      <put-attribute name="body"
value="/WEB-INF/view/logout.jsp"/>

  </definition>

 

  <definition name=".logoutTimeout" extends=".logout">

      <put-attribute name="logoutErrorKey"      value="logout.timeout" />

  </definition>

 

Then I added this to my JSP:

 

            <tiles:insertAttribute name="logoutErrorKey"/>

 

I changed my app to forward to .logoutTimeout and I get the following error:

 

144623 ERROR org.apache.tiles.jsp.taglib.RoleSecurityTagSupport | Error
executin

g tag: Attribute 'logoutErrorKey' not found.

org.apache.tiles.TilesException: Attribute 'logoutErrorKey' not found.

        at
org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttribute

Tag.java:112)

        at
org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport

.java:171)

        at
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecur

ityTagSupport.java:75)

        at
org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTag

Support.java:80)

 

And I have no idea where to go next. Help, please?

 

Thom Hehl
Sr. eJuror Architect
ACS: Government Solutions

* Office (859) 277-8800 x 144
* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  
1733 Harrodsburg Road
Lexington, KY 40504-3617



This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>  or by telephone at 859-277-8800 ext. 144.
Thank you.

 

Reply via email to