You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Murray Collingwood <mu...@gmail.com> on 2007/03/13 13:12:31 UTC

public abstract Boolean isQuery()

Hi all

Just trying to clarify my understanding.  I had some code that looked like the
following:

@Persist
public abstract Boolean isQuery();

The above code gives me an error, 'no implementation in class', and it took me a
while but I finally figured the problem that the enhanced class was not
identifying the Boolean.  It took a while longer for me to realise it was
because I didn't have a valid 'getter'.  I had to change the above to:

@Persist
public abstract Boolean getQuery();

Suddenly everything started working!  

So, why doesn't the enhanced class identify these boolean style function names.
 I thought this was some standard that ALL property functions were fetched using
get* and ALL boolean values fetched using is*.

Question:

1. Should I code all of my booleans using get* in future?

2. How does OGNL now deal with a boolean value returned via a get*?  Do I need
to modify my OGNL conditions?

Cheers
mc



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


Re: public abstract Boolean isQuery()

Posted by Steve Shucker <ss...@vmsinfo.com>.
big-B Boolean uses get/set
little-b boolean uses is/set

you need one of
public abstract Boolean getQuery()
public abstract Boolean getIsQuery()
public abstract boolean isQuery()

-Steve

Murray Collingwood wrote:
> Hi all
>
> Just trying to clarify my understanding.  I had some code that looked like the
> following:
>
> @Persist
> public abstract Boolean isQuery();
>
> The above code gives me an error, 'no implementation in class', and it took me a
> while but I finally figured the problem that the enhanced class was not
> identifying the Boolean.  It took a while longer for me to realise it was
> because I didn't have a valid 'getter'.  I had to change the above to:
>
> @Persist
> public abstract Boolean getQuery();
>
> Suddenly everything started working!  
>
> So, why doesn't the enhanced class identify these boolean style function names.
>  I thought this was some standard that ALL property functions were fetched using
> get* and ALL boolean values fetched using is*.
>
> Question:
>
> 1. Should I code all of my booleans using get* in future?
>
> 2. How does OGNL now deal with a boolean value returned via a get*?  Do I need
> to modify my OGNL conditions?
>
> Cheers
> mc
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   

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


Re: public abstract Boolean isQuery()

Posted by Jesse Kuhnert <jk...@gmail.com>.
I don't like this behavior either...F-# what javabeans say, if you add
the issue to http://jira.opensymphony.com/browse/OGNL I'll make sure
it gets fixed.

On 3/13/07, Murray Collingwood <mu...@gmail.com> wrote:
> Hi all
>
> Just trying to clarify my understanding.  I had some code that looked like the
> following:
>
> @Persist
> public abstract Boolean isQuery();
>
> The above code gives me an error, 'no implementation in class', and it took me a
> while but I finally figured the problem that the enhanced class was not
> identifying the Boolean.  It took a while longer for me to realise it was
> because I didn't have a valid 'getter'.  I had to change the above to:
>
> @Persist
> public abstract Boolean getQuery();
>
> Suddenly everything started working!
>
> So, why doesn't the enhanced class identify these boolean style function names.
>  I thought this was some standard that ALL property functions were fetched using
> get* and ALL boolean values fetched using is*.
>
> Question:
>
> 1. Should I code all of my booleans using get* in future?
>
> 2. How does OGNL now deal with a boolean value returned via a get*?  Do I need
> to modify my OGNL conditions?
>
> Cheers
> mc
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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


Re: public abstract Boolean isQuery()

Posted by Patrick Klein <pa...@bi-so.de>.
Hello,

i think the problem is that you used the Object-type Boolean not the 
simple-type boolean. For some reason (bug?) it's booleanValue() method 
is not called...
I personally never tried using Boolean as persist variables in my pages.

Regards,
    Patrick
> Hi all
>
> Just trying to clarify my understanding.  I had some code that looked like the
> following:
>
> @Persist
> public abstract Boolean isQuery();
>
> The above code gives me an error, 'no implementation in class', and it took me a
> while but I finally figured the problem that the enhanced class was not
> identifying the Boolean.  It took a while longer for me to realise it was
> because I didn't have a valid 'getter'.  I had to change the above to:
>
> @Persist
> public abstract Boolean getQuery();
>
> Suddenly everything started working!  
>
> So, why doesn't the enhanced class identify these boolean style function names.
>  I thought this was some standard that ALL property functions were fetched using
> get* and ALL boolean values fetched using is*.
>
> Question:
>
> 1. Should I code all of my booleans using get* in future?
>
> 2. How does OGNL now deal with a boolean value returned via a get*?  Do I need
> to modify my OGNL conditions?
>
> Cheers
> mc
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   


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