struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: dumb question
Date Thu, 18 Oct 2018 11:16:57 GMT
https://github.com/jkuhnert/ognl/blob/master/docs/LanguageGuide.md#constants

"Character literals, also as in Java: delimited by single-quotes, also
with the full set of escapes."


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

czw., 18 paź 2018 o 13:14 Lukasz Lenart <lukaszlenart@apache.org> napisał(a):
>
> czw., 18 paź 2018 o 12:44 Greg Huber <gregh3269@gmail.com> napisał(a):
> >
> > Sorry if this is a dumb question, but why does a single char string check
> > not work?  Am I missing something?
> >
> > this works:
> > public String getSelect() {
> >         return "az";
> > }
> > <s:if test="select == 'az'">
> > </s:if>
> >
> > this does not:
> > public String getSelect() {
> >         return "a";
> > }
> > <s:if test="select == 'a'">
> > </s:if>
>
> Probably it's because the 'a' in this case is a Char not String, try
> to use "" instead to return Char from getSelect()
>
> <s:if test='select == "a"'>
> </s:if>
>
> or
>
> public Char getSelect() {
>         return 'a';
> }
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/

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


Mime
View raw message