struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: Simple Question?
Date Tue, 16 Dec 2008 18:35:42 GMT
--- On Tue, 12/16/08, Oscar Alvarez wrote:
> try puting a comparator in your action like this
> 
> public Boolean isPipeEditAction(){
>        return "|".equals(getEditAction());
> }
> 
> and then test it in your view

I think your font is fooling you--the original question was regarding a capital 'i', 'I'.

The answer is that OGNL interprets a single character between single quotes as a character,
not a string, so the original comparison will not work. Using double quotes will work, as
will using a more meaningful representation of the action (like "insert").

This has been a FAQ entry for some time:

http://struts.apache.org/2.x/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html

Dave


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


Mime
View raw message