I have a form with with 3 choice components:
A) DropDownChoice
B) DropDownChoice
C) ListMultipleChoice
The values of B depend on selected value of A.
The values of C depend on selected values of A and B
I override the wantOnSelectionChangedNotifications() and
onSelectionChanged() methods of A and B.
A#onSelectionChanged
@Override
protected void onSelectionChanged(IntegerSelectChoice newSelection) {
super.onSelectionChanged(newSelection);
SearchForm.this.getModelObject().setInstrument(null);
SearchForm.this.getModelObject().setParams(null);
}
B#onSelectionChanged
@Override
protected void onSelectionChanged(IntegerSelectChoice newSelection) {
super.onSelectionChanged(newSelection);
SearchForm.this.getModelObject().setParams(null);
}
In A I set to null the model value of both B and C.
In B I set to null the model value only of B.
This code works only on the startup of the form. When I change the value
in A the list of C become empty. I have to change the value of B to fill C.
How can I manage this?
A
--
Alberto Brosich
Istituto Nazionale di Oceanografia e di Geofisica Sperimentale - OGS
Dipartimento di Oceanografia - OGA
National Oceanographic Data Centre/IOC - NODC
Borgo Grotta Gigante 42/c, 34010 Sgonico, Trieste (ITALY)
Phone: +39 040 2140281
E-mail:[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]