mission_mangal
mission_mangal

Reputation: 11

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

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 .

Upvotes: 1

Views: 158

Answers (1)

martin-g
martin-g

Reputation: 17503

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.

Upvotes: 1

Related Questions