Sounds like you should modify your myDesign tag to take a "key" attribute and look up the corresponding message, like <bean:message> does. You could look at the source of that tag class (org.apache.struts.taglib.bean.MessageTag) for ideas on how to implement this.
Craig On Fri, 7 Feb 2003, Tom Ziemer wrote: > Date: Fri, 07 Feb 2003 17:02:30 +0100 > From: Tom Ziemer <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Problem with struts, taglibs and i18n > > Hello, > > I've got a little problem: I am working on an application that uses > struts, castor, taglibs, etc. and I've written a custom tag > that will create the page-design for me: > ... > [Part of my tld] > <tag> > <name>myDesign</name> > <tagclass>tag.DesignTag</tagclass> > <bodycontent>jsp</bodycontent> > <info> > uni design > </info> > <attribute> > <name>design</name> > <required>true</required> > <rtexprvalue>false</rtexprvalue> > </attribute> > > <attribute> > <name>title</name> > <required>true</required> > <rtexprvalue>true</rtexprvalue> > </attribute> > > <attribute> > <name>heading</name> > <required>true</required> > <rtexprvalue>true</rtexprvalue> > </attribute> > </tag> > > Now I want to take advantage of the i18n capabilities that STRUTS has > and I tried to replace the TITLE and the HEADING with information > from my ApplicationResources.properties. But I cannot get it to work - > all it will display is "<bean:message key="index.heading"/>". > I have tried to access the information from index.heading via a > scriptlet but I couldn't figure out that one either. > > [Part of my login.jsp] > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> > <%@ taglib uri="/WEB-INF/myTest.tld" prefix="test" %> > > <test:myDesign design="uni" title="Uniforum - Login" > heading="??????????????????????????????????"> > <html:errors/> > <bean:message key="index.heading"/> > <test:myTable title="Login"> > <html:form action="/login"> > > Any help would be appreciated, > > Regards, > > Tom > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]