You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Engelhart <mo...@gmail.com> on 2005/03/25 22:55:56 UTC

ognl boolean method lookup

Hi-

I have a class that has an isLeaf() convenience method that has no
field associated with it, just a calculation.

My problem is I can't figure out how to call the method in a
conditional.  I tried this:

<span jwcid="@Conditional" condition="ognl:childNode.isLeaf">
and like this:
<span jwcid="@Conditional" condition="ognl:childNode.isLeaf()">
and like this:
<span jwcid="@Conditional" condition="ognl:childNode.leaf">

and neither of them worked.   

When I modified the method signature of the object to getIsLeaf() then
the following worked:
<span jwcid="@Conditional" condition="ognl:childNode.isLeaf">

Can anyone shed some light on what OGNL is doing?  I skimmed the OGNL
docs and  I didn't see anywhere that this was addressed.   getIsLeaf()
is totally non-standard so I think I must just be doing something
wrong.

Thanks for  any help

Mike

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


Re: ognl boolean method lookup

Posted by Michael Engelhart <mo...@gmail.com>.
Hey - 

Sorry about that post - bogus use of == for string comparison in the
method was causing my pain.

<span jwcid="@Conditional" condition="ognl:childNode.leaf">

works fine.

Mike

On Fri, 25 Mar 2005 15:55:56 -0600, Michael Engelhart
<mo...@gmail.com> wrote:
> Hi-
> 
> I have a class that has an isLeaf() convenience method that has no
> field associated with it, just a calculation.
> 
> My problem is I can't figure out how to call the method in a
> conditional.  I tried this:
> 
> <span jwcid="@Conditional" condition="ognl:childNode.isLeaf">
> and like this:
> <span jwcid="@Conditional" condition="ognl:childNode.isLeaf()">
> and like this:
> <span jwcid="@Conditional" condition="ognl:childNode.leaf">
> 
> and neither of them worked.
> 
> When I modified the method signature of the object to getIsLeaf() then
> the following worked:
> <span jwcid="@Conditional" condition="ognl:childNode.isLeaf">
> 
> Can anyone shed some light on what OGNL is doing?  I skimmed the OGNL
> docs and  I didn't see anywhere that this was addressed.   getIsLeaf()
> is totally non-standard so I think I must just be doing something
> wrong.
> 
> Thanks for  any help
> 
> Mike
>

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