Try it with the property= value in single quotes. -----Original Message----- From: Tejas Bavishi [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 1:31 PM To: 'Struts Users Mailing List' Subject: RE: Logic tag
Hi again, Thanks for the pointer. I tried the following two variations of codes, however, the results were same as per the earlier email. <logic:isPresent property="<mytaglib:getvalue name="cost" />"> FREE </logic:isPresent> <logic:notPresent property="<mytaglib:getvalue name="cost" />"> FREE </logic:notPresent> The getValue tag returns a String object. Is something wrong with this code ? Also, one more doubt is if the property attribute that I have used in the above code for isPresent tag, is it the correct use ? As the value I want to check comes from my own tag library. If I cannot achieve this using the logic taglib, is there another elegant way to do this ? Many Thanks, Tejas -----Original Message----- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 5:49 PM To: 'Struts Users Mailing List' Subject: RE: Logic tag Use <logic:isPresent> instead. Mark -----Original Message----- From: Tejas Bavishi [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 11:55 AM To: '[EMAIL PROTECTED]' Subject: Logic tag Hi, I have a question on using logic tags. In the following example, mytaglib is the tag library developed by me. I am printing the value returned by the following tag on the JSP page. <TD> <mytaglib:getvalue name="cost" /> </TD> Now, I want to check that if the value returned by mytag is "", then I want to print FREE. I tried the following code. <logic:equal property="<mytaglib:getvalue name="cost" />" value="" > FREE </logic:equal> But the text FREE is printed regardless of the value returned by mytag. Obviously, I am doing something wrong or my approach is not correct. Can someone please guide me on this. Many Thanks, Tejas -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>