struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holman, Cal" <CHol...@Paymentech.com>
Subject RE: title in JSP template
Date Wed, 24 Apr 2002 17:31:46 GMT
With tiles I think the same thing will work with templates - wrap the
put:title around the bean:message

Index.jsp
<tiles:insert definition="home.pagedef" flush="true">
    <tiles:put name="title"> <bean:message key="home.title" /> </tiles:put>
</tiles:insert>


Template.jsp
<title><tiles:getAsString name="title"/></title>

Cal

-----Original Message-----
From: Hair, Jeffrey [mailto:JHair@fcg.com]
Sent: Wednesday, April 24, 2002 13:17
To: Struts User Mailing List (E-mail)
Subject: title in JSP template

I'm using a JSP template that contains several fields - one being the title
to be used in the html. The problem is that the title is 'hardcoded' within
index.jsp. I want to be able to pull this info from my ApplicationResources
file using <bean:message key="home.title"> tag in order to support
internalization.

Is there a way to 'nest' tag calls?

Thanx,
jsh


template.jsp
...
<head>
<title><template:get name='title'/></title>
...

index.jsp
<%@ taglib uri="/WEB-INF/tlds/struts-template.tld" prefix="template" %>

<template:insert template="/inc/jsp/template1.jsp">
   <template:put name="title" content="Home" direct="true"/>
   <template:put name="header" content="/inc/jsp/Header.jsp"/>
   <template:put name="sideBar" content="/inc/jsp/SideBarMenu.jsp"/>
   <template:put name="content1" content="/indexContent.jsp"/>
</template:insert>

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

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


Mime
View raw message