Hi Mike, On 22/05/2010 00:22, [email protected] wrote: > > 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?
Binding should happen on the name of the Table if it is defined. Its worth pointing out that autobinding does not add any special feature but simply streamlines the process of defining the control name (if no name is defined on the control) and adding the control to the page control list. Have a look at the doco here, especially the second example which shows what happens "behind the scenes": http://click.apache.org/docs/user-guide/html/ch04s02.html#application-autobinding What is not clear from the docs is that if the control name is defined, autobinding won't change it, but simply add it to the page control list eg: public PageLink link = new PageLink("blah", SomePage.class); addControl(link); If the name was not defined autobinding will set the name to the ivar name: public PageLink link = new PageLink(); link.setName("link"); addControl(link); Hope that helps. Kind regards Bob
