Hi Wendy, Thank you very much for your reply.
Yes, I also thought that I could test the key, then check to see if the value was empty. But just how to do it is eluding me. I think part of the problem might be this: USAGE NOTE - If you use another tag to create the body content (e.g. bean:write), that tag must return a non-empty String. An empty String equates to an empty body or a null String, and a new scripting variable cannot be defined as null. Your bean must return a non-empty String, or the define tag must be wrapped within a logic tag to test for an empty or null value. (from the Struts User Guide for bean:define at http://struts.apache.org/userGuide/struts-bean.html#define). I'm trying to do something like <tiles:useAttribute name="directionToUser" classname="java.lang.String"/> <bean:define id="directionToUserString" class="java.lang.String"> <bean:message key="<%=directionToUser.toString()%>"/> </bean:define> <logic:notEmpty name="directionToUserString"> <div class="modFormBox"><bean:write name="directionToUserString"/></div> </logic:notEmpty> But it's failing (I think) because the bean:message returns an empty String. I would wrap it in a logic tag as suggested, but if I could do that, I'd just use the same logic for my logic:notEmpty tag instead. So finding a way to take that value and assign that to a variable which I can then test to see whether or not it's empty is what I'm trying to do. It was not my idea to add all of these empty i18n values: the i18n team did it. If I can't find a way to make this idea work, that's my alternate path. If that's the road I need to take, I can do it -- I was just hopeful I could do this a little more elegantly. Thanks for your input. Any further ideas? Chris -----Original Message----- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 11:52 AM To: Struts Users Mailing List Subject: Re: Test whether an application resource is empty From: "Chris Loschen" <[EMAIL PROTECTED]> > Quick synopsis: I have localized i18n messages defined in my tiles > definitions which are sometimes empty. I need to test that the value > associated with a given key is not empty before I proceed with further > processing. I can test that the key is non-empty, but I haven't yet > figured out how to test the same thing for the value. If you can test the key, then it would seem that removing the empty messages would solve the problem. Why are the empty ones there in the first place? Can you get rid of them? -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _______________ Siebel IT'S ALL ABOUT THE CUSTOMER Visit www.siebel.com This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]