try puting a comparator in your action like this public Boolean isPipeEditAction(){ return "|".equals(getEditAction()); }
and then test it in your view 2008/12/16 Dave Newton <newton.d...@yahoo.com> > > Famoso Struts OGNL :-)! > > Or typical Java. > > OGNL one-ups Java, in fact, as OGNL will treat multiple characters within > single-quotes as a string, but falls back to standard Java if it's a single > character. > > Dave > > > Musachy Barroso wrote: > > > > > > I think OGNL will try 'I' as a character, so > > they will never match, > > > just a hunch :) > > > > > > musachy > > > > > > On Tue, Dec 16, 2008 at 11:58 AM, Mark Rollins > > > <mark.roll...@computer.org> wrote: > > >> > > >> I know this should be obvious. Perhaps I'm > > just too thick to use Struts2! > > >> > > >> I have an action class with a private String > > editAction and corresponding > > >> public getter/setter. I know the value for this > > String is "I". > > >> > > >> In the view I need to test the value of this field > > using <s:if > > >> test="...">, > > >> to see if it is "I" > > >> > > >> I've tried just about everything I can for the > > test expression, including > > >> editAction=='I', > > %{editAction=='I'}, #editAction=='I', > > >> %{#editAction=='I'}, > > >> %{getEditAction()=='I'} but nothing works. > > >> > > >> I had thought that properties of an action class > > were available on the > > >> value > > >> stack. Do I need to use a .Equals() method? > > >> > > >> Why, why why isn't this simple? Please put me > > out of my misery! > > >> > > >> Many thanks > > >> > > >> > > >> -- > > >> View this message in context: > > >> > > http://www.nabble.com/Simple-Question--tp21037097p21037097.html > > >> Sent from the Struts - User mailing list archive > > at Nabble.com. > > >> > > >> > > >> > > --------------------------------------------------------------------- > > >> To unsubscribe, e-mail: > > user-unsubscr...@struts.apache.org > > >> For additional commands, e-mail: > > user-h...@struts.apache.org > > >> > > >> > > > > > > > > > > > > -- > > > "Hey you! Would you help me to carry the > > stone?" Pink Floyd > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > user-unsubscr...@struts.apache.org > > > For additional commands, e-mail: > > user-h...@struts.apache.org > > > > > > > > > > > > > -- > > View this message in context: > > http://www.nabble.com/Simple-Question--tp21037097p21037595.html > > Sent from the Struts - User mailing list archive at > > Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: > > user-h...@struts.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >