I was partially correct. WW does find methods with or without 'get'.  So
this will work.

This <webwork:property value="string('gif')/endsWith('f')"/> will find a
method public String string(String whatever) and return true.


But this <webwork:if test="string('gif')/endsWith('f') == true"> does not
work hence your question.

I can duplicate this bug by adding a #13 test to expression test page. It
will not print "Success".
13) webwork:if test="bool('true') == true"
<webwork:if test="bool('true')/booleanValue/endsWith('e') == true">
   <b>Success</b>
</webwork:if>

So, looks like a bug. Thanks.

-Matt



----- Original Message -----
From: "Scott Farquhar" <[EMAIL PROTECTED]>
To: "Matt Baldree" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 22, 2002 8:34 PM
Subject: Re: [Webwork-user] webwork:if tag problems


> Matt,
>
> Thanks for the answer - but why does the first one work then?  Why does
> it print out B?
>
> Cheers,
> Scott
>
> Matt Baldree wrote:
> > see inline
> >
> > ----- Original Message -----
> > From: "Scott Farquhar" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, April 21, 2002 10:10 PM
> > Subject: [Webwork-user] webwork:if tag problems
> >
> >
> >
> >>I am having problems with the webwork:if tag, and I am not sure if I am
> >>doing something wrong.
> >>
> >>The following code prints out B, but not A.
> >>~~~~~~~~~~~~~~~~~~~~~
> >><webwork:property
> >>     value="string('filename')/endsWith('f')" >
> >>         <webwork:if test=". == true" > B </webwork:if>
> >></webwork:property>> >>
> >><webwork:if
> >>     test="string('filename')/endsWith('f') == true" > A </webwork:if>
> >>~~~~~~~~~~~~~~~~~~~~~
> >
> >
> > I assume "string('filename')" is returning a String and the intention is
to
> > call the method endsWith('f'). But, WW is looking for getEndsWith()
which it
> > does not find.
> >
> >
> >>So my problem is that the value evaluates if it is separated out into a
> >>property & then an if, but not if it is all in the same statement.
> >>
> >>Can somebody point out if I am doing anything wrong?  Note that the
> >>following code does print out 'A':
> >>
> >><webwork:if test="'gif'/endsWith('f')" > A </webwork:if>
> >
> >
> > This one works because the test() is just checking to see that the
result is
> > not null.
> >
> >
> >
> >>Thanks in advance,
> >>Scott
> >>
> >>--
> >>Scott Farquhar :: [EMAIL PROTECTED]
> >>
> >>Atlassian :: http://www.atlassian.com
> >>      Supporting YOUR J2EE World
> >>
> >>
> >>_______________________________________________
> >>Webwork-user mailing list
> >>[EMAIL PROTECTED]
> >>https://lists.sourceforge.net/lists/listinfo/webwork-user
> >>
> >>
> >
> >
> >
> >
>
>
> --
> Scott Farquhar :: [EMAIL PROTECTED]
>
> Atlassian :: http://www.atlassian.com
>       Supporting YOUR J2EE World
>
>
> _______________________________________________
> Webwork-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webwork-user
>
>



_______________________________________________
Webwork-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webwork-user

Reply via email to