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
