struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yasser Zamani <yasserzam...@apache.org>
Subject Re: Converting struts1 tag to struts2 null handling
Date Fri, 24 Nov 2017 15:15:11 GMT


On 11/24/2017 3:31 PM, heberraja@gmail.com wrote:
> <s:if test='%{! #row.type.equals("head")}'>
> 
> How to make this true when #row.type is null.

I tested below instead, and works:

<s:if test='%{! "head".equals(#row.type)}'>

However, you pointed an important note out. It caused that I think maybe 
it was better to throw an NPE in such cases.

Thanks for your report,
Yasser.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Mime
View raw message