pankajvermani
Aug 10th, 2005, 11:56 AM
I have a web application using spring MVC. My tiles definition look like this:
<definition name="template" page="/tiles/mainTemplate.jsp" controllerClass="com.tf.app.geoapp.ui.controllers.util.MainTemplate Controller" >
<put name="title" value="Application"/>
<put name="content" value="/error.jsp"/>
</definition>
<definition name="login" extends="template">
<put name="title" value="Login Screen"/>
<put name="content" value="/login.jsp" type="page"/>
</definition>
The template jsp looks like:
<head>
<title>
<fmt:message key="site.name"/>: <tiles:getAsString name="title" />
</title>
</head>
<body>
<tiles:insert name="content" />
</body>
As visible by the fmt tag in jsp, I am using I18N, in the application. Now i wish to access "title" values coming from the tiles definition (i.e. "Login Screen" ) to be actually a key (say "login.title") which gets mapped to the messages.properties, and finally that property value gets rendered on the screen. Any ideas on how to do that?
Can anyone help me at that?
Thanks
<definition name="template" page="/tiles/mainTemplate.jsp" controllerClass="com.tf.app.geoapp.ui.controllers.util.MainTemplate Controller" >
<put name="title" value="Application"/>
<put name="content" value="/error.jsp"/>
</definition>
<definition name="login" extends="template">
<put name="title" value="Login Screen"/>
<put name="content" value="/login.jsp" type="page"/>
</definition>
The template jsp looks like:
<head>
<title>
<fmt:message key="site.name"/>: <tiles:getAsString name="title" />
</title>
</head>
<body>
<tiles:insert name="content" />
</body>
As visible by the fmt tag in jsp, I am using I18N, in the application. Now i wish to access "title" values coming from the tiles definition (i.e. "Login Screen" ) to be actually a key (say "login.title") which gets mapped to the messages.properties, and finally that property value gets rendered on the screen. Any ideas on how to do that?
Can anyone help me at that?
Thanks