Here is a test sample of how constructor for Form2 class looks like:
Form2 should update both childId and parentName, when child changes in
form1.
However, I only get the childId updated; parentName does not change.
public Form2(String id, IModel form1model) {
super(id,model);
Label lblChild =
Hello,
In the form2 I need to display values from other models than in form1, but
that are dependent on the values from the form1 model.
On Tue, Jun 28, 2016 at 4:42 PM, Sven Meier [via Apache Wicket] <
ml-node+s1842946n4674974...@n4.nabble.com> wrote:
> After form submit the whole page will
After form submit the whole page will be re-rendered anyway, including your
form2. So you should not need to do anything additional here.
Make sure your form2 is properly bound to your model objects:
https://ci.apache.org/projects/wicket/guide/6.x/guide/modelsforms.html
Have fun
Sven
--
View
Hi,
Thank you for the help.
Now the requirement has changes, to update form2 after the submit of form1.
On form1:
SubmitLink lnk = new SubmitLink("saveSubmitLink") {
---
}
form1.add(lnk);
So, after the save of form1, I need to refresh the date on form2.
Could you please advise?
Thank you so
Hi,
you're using a DropDownChoice? Then you have to use
AjaxFormComponentUpdatingBehavior (note no "Choice" here).
AjaxFormChoiceComponentUpdatingBehavior is to be used with Wicket input
components which have multiple tags in the resulting HTML.
Have fun
Sven
--
View this message in context:
Hi,
Thank you for the tip.
One issue that I'm facing now is that the listView is in one form on the
page (form1), and the table with the column is in another form on the same
page (form2).
=If in my form1 I call:
itemSelect.add(new AjaxFormChoiceComponentUpdatingBehavior() {
private static
Hi,
you should use a column that always displays the correct text:
new AbstractColumn(Model.of("Text")) {
public void populateItem(Item> cellItem, String
componentId, IModel rowModel) {
cellItem.add(new Label(componentId), new
AbstractReadOnlyModel() {