Hi, Form fields binding is performed in the onProcess() method, not in the onInit() method. The onInit() method is used primarily for post construction operations, and is provided for your use. Click doesn't do anything special in this phase.
Most of the action happens in the onProcess() phase. For example a Form control will determine whether it is being targeted in a request, and if so it will process all its child controls. All the form fields will then have their onProcess() method called. Fields generally implement a pattern in their onProcess() method where they perform data binding, validation and dispatch an event to any listeners. After the onProcess phase has been completed, the ClickServlet will fire event's to any registered listeners, for example an Submit control "onClick" listener. You can think of these as closures, and in fact were inspired by Delphi's function pointers. regards Malcolm Edgar On Mon, Oct 25, 2010 at 11:11 AM, Tomás P. Tapia <[email protected]> wrote: > Hi, > > I'm new to click, i don't know if it's ok but : > > ifi set the value to a control in the onInit() method, then onProcess() > method overrides it without the form being submited. Until i understood the > SetValue executed in onInit must be honored, moreover if there is no > submission in course. > > I'm using click 2.2. > > Regards, > Tomás Tapia Silva - Software Engineer > > >
