cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Franz <afra...@optushome.com.au>
Subject Re: Test for blank or null string in Jx
Date Sun, 24 Jul 2005 17:04:14 GMT
The following is JSP/JSTL equivalent to test for null parameters or 
database columns:
<c:when test="${empty rs.foo}">
<c:when test="${empty param.foo}">



footh wrote:

>Thanks for the reply but still no luck using this
>(with a param that is null):
>
><jx:if test="isEmpty (${mynullparam})">
>
>I even tried:
>
><jx:if test="isEmpty (null)">
>and
><jx:if test="isEmpty ('')">
>
>Both resolve to false.  Additionally, I have a
>parameter that I know I'm passing as a blank string
>("").  And when I do this:
>
><jx:if test="${myblankparam} == ''">
>
>It resolves to true as expected.  However, when I do
>this:
>
><jx:if test="${myparam} != ''">
>
>It still resolves to true.  This is driving me crazy. 
>Any other suggestions?
>
>--- Mark Lundquist <ml@wrinkledog.com> wrote:
>
>  
>
>>On Jul 22, 2005, at 10:52 AM, footh wrote:
>>
>>    
>>
>>>This seems like it should be easy but I've tried a
>>>million different combinations and I can't seem to
>>>      
>>>
>>get
>>    
>>
>>>a jx if tag to test for a blank or null string.
>>>
>>>Can someone point me in the right direction?
>>>      
>>>
>>Been there, felt the pain.  I don't know why it
>>doesn't "just work" the 
>>way you would expect.
>>
>>Anyway, this will work
>>
>>	<jx:if test="isEmpty (theString)">
>>
>>cheers,
>>—ml—
>>
>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail:
>>users-help@cocoon.apache.org
>>
>>
>>    
>>
>
>
>
>		
>____________________________________________________
>Start your day with Yahoo! - make it your home page 
>http://www.yahoo.com/r/hs 
> 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message