On 11/16/2011 06:06 PM, Andrea Del Bene wrote:
> Hi,
>
> can you elaborate a little bit more what behavior you want to achieve?
> I mean, C becomes empty because  A#onSelectionChanged sets its model
> to null. This should not be strange.

Yes, sounds obvious to me too. But I found an examples with 2
dropdownchoice where in onSelectionChanged() of the first one is set to
null the model of the second one.
For two choices works well.
Maybe is a wrong pattern, but I not found anything useful.
Do you have other solutions?

A

>>
>> 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
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to