Updates within Panels in datatable
I have a datatable in which each row contains two panels. In one panel I have a textfield and a radio button and in the other panel I have a button. So there can be many textfields and buttons. When the user clicks the button in panel 2 in one of the rows I need to read the values in the textfield and radiobutton. In the buttons I have
button.setDefaultFormProcessing(false);
So that onSubmit is called instead of the form processor. I have two issues:
- Even though I do nothing in onSubmit (which I know does get called) the table is reloaded (button.getRequest() shows the request for the page to reload). I'd like to stop the auto redraw and do an AJAX update from within onSubmit instead, I am not sure how to stop the table reload when the button is clicked.
- from within onSubmit() in panel2 the textfield and the radio button in panel1 show their original values and not the values that I typed in prior to pressing the button. The widgets have PropertyModels. To load the panels I overrode public void populateItem(Item item, String componentId, IModel model) in the table columns and then added the panels where appropriate. What can I do to update the data in panel1 when the button in Panel2 is clicked?