Hello Martin,

+1 to the second case

Wednesday, May 23, 2001, 11:12:59 AM, you wrote:

MC> It seems that it is not possible to use the logic tags to test "is this
MC> property either null or an empty string?". Using <logic:present>, I can
MC> determine that some value is present, but as far as I can tell, there is no
MC> way to test for an empty string. Specifying value="" for tags such as
MC> notEqual seems to result in a complaint that a required attribute has not
MC> been specified. (Is this correct, or is this a bug in Resin, the container
MC> I'm using?)

MC> So, I had a couple of ideas for solving this, and I'd like to hear what
MC> people think.

MC> 1) Modify the present and notPresent tags such that the empty string is
MC> equivalent to null for the purposes of this test, if in fact the specified
MC> property is a String. This might break things, though - I'm not sure.

MC> 2) Define two new logic tags - perhaps empty and notEmpty - which define
MC> emptiness as a property being either null or the empty string. Unlike
MC> present and notPresent, these tags would only work with the name and
MC> property attributes (i.e. not cookie, parameter, etc), since the others
MC> don't really make sense distinct from present and notPresent.

MC> The second option appeals to me more, because it seems somewhat cleaner than
MC> muddying the definition of presence to include type-specific values.

MC> Comments, anyone?

-- 
Best regards,
 Oleg                            mailto:[EMAIL PROTECTED]


Reply via email to