There are 3 tabs in a tabbedpanel, a TextField component is in the first tab, and several form components in the other tabs for user input. I added a save button in the tabbedpanel(instead add 3 buttons in each tab, because I just want to save all user inputs by one click), my question is, how to get the TextField value whick is belonged to the first tab when click on the save button.
Html Code: <div wicket:id="tabs">[tabbed panel will be here]</div> <form wicket:id="form"> <input wicket:id="buttonsave" type="submit" value="Submit" /> </form> Java Code: final List<ITab> tabs = new ArrayList<ITab>(); tabs.add(new AbstractTab(new Model<String>("tab1")) { @Override public Panel getPanel(String panelId) { return new TaskCreateTabPanel1(panelId); } }); tabs.add(new AbstractTab(new Model<String>("tab2")) { @Override public Panel getPanel(String panelId) { return new TaskCreateTabPanel2(panelId); } }); tabs.add(new AbstractTab(new Model<String>("tab3")) { @Override public Panel getPanel(String panelId) { return new TaskCreateTabPanel3(panelId); } }); add(new TabbedPanel("tabs", tabs).add(new AttributeModifier("class", true, this.getDefaultModel()))); Form form = new Form("form") { protected void onSubmit() { } }; Button buttonsave = new Button("buttonsave") { public void onSubmit() { //Here we should get the TextField value and save it into db } }; form.add(buttonsave); --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org