You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Fenderbosch, Eric" <Er...@fedex.com> on 2003/10/15 16:20:59 UTC

RE: message vs bean:message & Tiles [SOLVED]

Reading jstl-1_0-fr-spec.pdf helped.
I needed
<fmt:message key="${titleKey}"/>

-----Original Message-----
From: Fenderbosch, Eric 
Sent: Wednesday, October 15, 2003 10:05
To: struts-user@jakarta.apache.org
Subject: fmt:message vs bean:message & Tiles


Maybe this would be better off in the taglibs group, but since it is also Tiles related, I thought I'd ask here first.
I'm trying to get rid of all instances of bean:message in favor of fmt:message, but I'm not getting it to work when referencing a tiles attribute.

tiles-config.xml:
  <definition name=".default" path="/tiles/defaultLayout.jsp">
    <put name="titleKey"/>
    <put name="quickHelpKey"/>
    <put name="header" value="/common/header.jsp"/>
    <put name="body"/>
    <put name="nav" value="/common/nav.jsp"/>
    <put name="footer" value="/common/footer.jsp"/>
  </definition>
  <definition name=".login" extends=".default">
    <put name="titleKey" value="title.login"/>
    <put name="quickHelpKey" value="href.quickHelp.login"/>
    <put name="nav" value="/common/empty.jsp"/>
    <put name="body" value="/pages/login.jsp"/>
  </definition>

In my defaultLayout.jsp this works:

<title>
  <tiles:useAttribute name="titleKey"/>
  <bean:message name="titleKey"/>
</title>

as does:

<title>
  <tiles:importAttribute name="titleKey"/>
  <bean:message name="titleKey"/>
</title>

But neither this:

<title>
  <tiles:useAttribute name="titleKey"/>
  <fmt:message var="titleKey"/>
</title>

nor this:

<title>
  <tiles:importAttribute name="titleKey"/>
  <fmt:message var="titleKey"/>
</title>

work correctly.  I've read Chapter 13 in O'Reilly Jakarta Struts and Cedric's Tiles Advanced Features, but I'm still confused on how to get this to work.  Any help would be appreciated.

Thanks.

Eric

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



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