no, wait... sorry.  i just read that again.  i'm confused again.  doesn't 
the binding use reflection to find the ivar names and use that to do the 
binding?  why would PageLink bind on a name in an object it's pointing to? 
 when i create a new Table the binding happens to the ivar, not some name 
i give the Table.  what am i missing here?

thanks again and sorry for my earlier misinterpretation.
-mike



From:
[email protected]
To:
[email protected]
Date:
05/21/2010 10:00 AM
Subject:
Re: PageLink binding




oh, so this is a lifecycle thing.  gotcha.  thanks. 

-mike 


From: 
Bob Schellink <[email protected]> 
To: 
[email protected] 
Date: 
05/20/2010 06:28 PM 
Subject: 
Re: PageLink binding




Hi Mike,

On 21/05/2010 04:57, [email protected] wrote:
> 
> @Bindable protected PageLink refreshImage = new PageLink("Refresh",
> ThisClass.class);
> 
> but when I reference $refreshImage in the velocity template.  It prints
> out "$refreshImage".  I have other stuff that is @Bindable protected in
> the same class and it renders fine on the same template.  Is there a bug
> with PageLinks?


The Velocity reference should be the same as the name of the control, in 
this case $Refresh. Binding
will set the Control name only if the Control has no name defined. In 
other words you could have
used $refreshImage if you did the following:

 @Bindable protected PageLink refreshImage = new PageLink();

Binding will detect that the PageLink has no name defined and set it 
automatically to the name of
the field, which translates to:

 refreshImage.setName("refreshImage");

I'll add this to the doco which isn't very clear on this issue.

Kind regards

Bob



Reply via email to