click-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Schellink <sab...@gmail.com>
Subject Re: Statefull pages with ActionLinks on
Date Thu, 29 Jan 2009 20:06:34 GMT
Victor Fran├ža wrote:

>     public FNetSelect sltClientGroup =new FNetSelect("sltClientGroup", 


I think the problem is that sltClientGroup is declared as "public". 
Click handles public controls in a special way in that it 
automatically adds them directly to your Page. Meaning when the Page 
controls are processed, the Select will also be processed (which 
internally invokes bindRequestValue). This would nullify your Select 
value.

The fix should be easy, just declare your Select as "private" and it 
won't be added directly to the Page controls. With this change Select 
will only have its value bound if the Form is actually submitted.

Btw you should probably declare your controls as private unless you 
want them added to the Page's controls. See the following section for 
details on this feature:

http://incubator.apache.org/click/docs/configuration.html#application-autobinding


>    It doesn't matter the content of the constructor, as it will be 
> called just on the first time the Page is requested, isn't?


Yep this is correct. :)

kind regards

bob

Mime
View raw message