Just declare them final, should work just fine, but with consequences (you wont be able to re-reference them in a future).
On Thu, Dec 17, 2009 at 8:45 AM, marioosh.net <[email protected]>wrote: > Is simple possibility to access page components in anonymous onClick > method like in code below ? > > public class NewLinkPanel extends Panel { > public NewLinkPanel(String id) { > super(id); > > TextField name = new TextField("name"); > TextField address = new TextField("address"); > add(name); > add(address); > add(new AjaxLink("ok"){ > public void onClick(AjaxRequestTarget target) { > // how to get name and address values ? > System.out.println("ok"); > } > }); > } > } > > Thanks in advance. > > -- > Greetings, > marioosh > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Best regards, Paul Szulc http://paulszulc.wordpress.com
