Hi,

I have a layout contentFrameLayout.jsp:

<html>
<head></head>
<body>
    <tiles:useAttribute name="screenName" scope="request"/>
    <tiles:insert attribute="header" />
    <tiles:insert attribute="body" />
    <tiles:insert attribute="footer" />
</body>
</html>

In my tiles-def.xml, I assign values to these attributes:

<definition name="content.default" page="/jsp/layouts/contentFrameLayout.jsp">
    <put name="screenName" value="Introduction" />
    <put name="header" value="/jsp/common/header.jsp" />
    <put name="body" value="/jsp/common/introduction.jsp" />
    <put name="footer" value="/jsp/common/footer.jsp" />
</definition>

<definition name="signin.default" extends="content.default">
    <put name="screenName" value="Sign In" />
    <put name="body" value="/jsp/common/signin.jsp" />
</definition>

In struts-config, my action forwards to the  definition "content.default" on success.

I am trying to use the attribute screenName inside header.jsp
(which is a tile for contentFrameLayout.jsp) in the following manner:

<TD WIDTH=300 BGCOLOR=#336699 CLASS=bodytextboldwhite>
    <! -- value of screenName displayed here -->
    <bean:write name="screenName" />
</TD>

I followed some guidelines in the following article:

http://www.developer.com/java/ent/article.php/10933_2192411_5

but the bean:write writes nothing to the screen (i.e the column comes up empty).
It looks like there might be a context problem since doing a bean:write in
the layout jsp works but not in the tile header.jsp. There are no error messages
at runtime.

Does anyone know how I can accomplish this? My main goal is to use the same
layout for every content page and have the option of dynamically displaying the 
screenName
each time the tile header.jsp is used.

Thanks,
SB


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to