after selecting 'Choose one' in drop-down in wicket

144 Views Asked by At

I have 3 option in drop-down in DropDownChoice in Apache wicket, and when I select default 3 options it will add one text field with respective to each choice but when I select default 'choose one' it unable to invisible all the text field which visible when we select any those 3 choices.

For example: products has 3 choices along with their textfield.

ChoiceA - textfield1
ChoiceB - textfield2
ChoiceC - textfield3

and when we select default 'choose one' it should remove/make invisible all textfield from UI .

1

There are 1 best solutions below

0
martin-g On

When "Choose One" is selected the model object of the DropDownChoice will be null. If it is null then you should hide the TextFields, otherwise you should show them, i.e. make them visible.