Re: dynamic arg0 in bean:message?
Either escape the double quotes (bean:write name=\globals\ property=\minChars\ / ) or use single quotes (bean:write name='globals' property='minChars' / ). --- Frank Maritato [EMAIL PROTECTED] escribió: Hi, What I want to do is something like this: bean:message key=error.minCharacters arg0=bean:write name=globals property=minChars / / or bean:message key=error.minCharacters arg0=%=minChars% / Where arg0 is the result of a bean property, but I can't seem to get it to work. If I hard-code the value bean:message key=error.minCharacters arg0=20 / It works, but it kinda defeats the purpose. What am I doing wrong, or is there a better way to accomplish this? Thanks -- Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic arg0 in bean:message?
Your first example is invalid : bean:message key=error.minCharacters arg0=bean:write name=globals property=minChars / / A JSP tag cannot be used as attribute value of another tag (XML syntax) This should work : bean:define id=minChars name=globals property=minChars type=String/ bean:message key=error.minCharacters arg0=%=minChars% / Nico. - Original Message - From: Domingo A. Rodriguez S. [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:48 PM Subject: Re: dynamic arg0 in bean:message? Either escape the double quotes (bean:write name=\globals\ property=\minChars\ / ) or use single quotes (bean:write name='globals' property='minChars' / ). --- Frank Maritato [EMAIL PROTECTED] escribió: Hi, What I want to do is something like this: bean:message key=error.minCharacters arg0=bean:write name=globals property=minChars / / or bean:message key=error.minCharacters arg0=%=minChars% / Where arg0 is the result of a bean property, but I can't seem to get it to work. If I hard-code the value bean:message key=error.minCharacters arg0=20 / It works, but it kinda defeats the purpose. What am I doing wrong, or is there a better way to accomplish this? Thanks -- Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com - 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]
Re: dynamic arg0 in bean:message?
Thanks everyone! Since I had a jsp:useBean in the page already, I was able to do the following: %=\\+globals.getMinChars()% Nicolas De Loof wrote: Your first example is invalid : bean:message key=error.minCharacters arg0=bean:write name=globals property=minChars / / A JSP tag cannot be used as attribute value of another tag (XML syntax) This should work : bean:define id=minChars name=globals property=minChars type=String/ bean:message key=error.minCharacters arg0=%=minChars% / Nico. - Original Message - From: Domingo A. Rodriguez S. [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 29, 2003 1:48 PM Subject: Re: dynamic arg0 in bean:message? Either escape the double quotes (bean:write name=\globals\ property=\minChars\ / ) or use single quotes (bean:write name='globals' property='minChars' / ). --- Frank Maritato [EMAIL PROTECTED] escribió: Hi, What I want to do is something like this: bean:message key=error.minCharacters arg0=bean:write name=globals property=minChars / / or bean:message key=error.minCharacters arg0=%=minChars% / Where arg0 is the result of a bean property, but I can't seem to get it to work. If I hard-code the value bean:message key=error.minCharacters arg0=20 / It works, but it kinda defeats the purpose. What am I doing wrong, or is there a better way to accomplish this? Thanks -- Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com - 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] -- Frank Maritato - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dynamic arg0 in bean:message?
Hi, What I want to do is something like this: bean:message key=error.minCharacters arg0=bean:write name=globals property=minChars / / or bean:message key=error.minCharacters arg0=%=minChars% / Where arg0 is the result of a bean property, but I can't seem to get it to work. If I hard-code the value bean:message key=error.minCharacters arg0=20 / It works, but it kinda defeats the purpose. What am I doing wrong, or is there a better way to accomplish this? Thanks -- Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic arg0 in bean:message?
Frank == Frank Maritato [EMAIL PROTECTED] writes: Frank Hi, Frank What I want to do is something like this: Frank bean:message key=error.minCharacters Frank arg0=bean:write name=globals property=minChars / / Frank or Frank bean:message key=error.minCharacters Frank arg0=%=minChars% / Frank Where arg0 is the result of a bean property, but I can't seem to get it to Frank work. If I hard-code the value Frank bean:message key=error.minCharacters arg0=20 / Frank It works, but it kinda defeats the purpose. Frank What am I doing wrong, or is there a better way to accomplish this? Well, the best way is probably to use the Struts-EL tag library, which will allow you to do this: bean:message key=error.minCharacters arg0=${globals.minChars} / Your first attempt failed because you can't nest custom tags in custom tag attributes. Your second attempt failed (probably) because your scriptlet variable minChars was not declared, or set to the value of your bean property. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP; SCWCD; SCBCD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]