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