|
<%@ page language="java"%> <%@ taglib uri="/WEB-INF/tld/struts-tiles.tld"
prefix="tiles"%> <%@ taglib uri="/WEB-INF/tld/struts-bean.tld"
prefix="bean"%> This is a test of struts and tiles <bean:define name="org.apache.struts.action.MESSAGE" id="messages" type="org.apache.struts.util.MessageResources"/> <tiles:insert page="masterLayout.jsp" flush="true"> <tiles:put name="title" value='<%=messages.getMessage("link.labelPrinting")%>'/> <tiles:put name="header" value="header.jsp" /> <tiles:put name="content" value="content.jsp" /> <tiles:put name="footer" value="footer.jsp" /> </tiles:insert> <br> test complete From:
Leon van der Merwe [mailto:[EMAIL PROTECTED] I think the nested tags might
be an answer but not sure how to implement it. Must be something like this. <tiles:put
name="title" value="<nested:message
key='menu.heading'/>" /> has anyone used
the nested tag inside <tiles to retrieve a bean:message -----Original
Message----- One of
the weaknesses in struts I think is that you can’t generally nest one tag
in another. This is what you’re trying to do here. Your
alternative is to use <%= … %> in place of the <bean:message
… > if possible. I
don’t know what the java equivalent of bean:message is though. From:
Leon van der Merwe [mailto:[EMAIL PROTECTED] Just a syntax
issue…. This works fine: <tiles:put
name="heading" value="main menu page heading"/> Now I want to get the
text from my resources file for internationalization so I need to add <bean:message
key="link.labelPrinting" /> where the text in value is therefore <tiles:put name="heading"
value="<bean:message key=’link.labelPrinting’
/>"/> should work but syntax error!!! Basically all I want to
know is how to replace the string value with <bean:message
key="link.labelPrinting" /> thanks Leon van der Merwe Programmer Bytes Specialised Solutions
A division of Bytes Technology Group
SA (Pty) Ltd : Registration No: 2003/027603/07 E-Mail Disclaimer: http://www.altron.co.za/email.asp or phone: (+27) (11)
645-3600 |
- [CTJUG Forum] Re: internationalization and tiles Michael Wiles
- [CTJUG Forum] Re: internationalization and tiles Leon van der Merwe
- [CTJUG Forum] Re: internationalization and tiles Michael Wiles
