I have a Wicket DropDownChoice and I am trying to avoid using Ajax methods. After the selection of a value I want the selection to be read-only and the user not be able to change it again.
final DropDownChoice<Pet> dropdown = new DropDownChoice<Pet>("dropdown",
new PropertyModel<Pet>(this, "selected"), list, choiceRenderer) {
// code here
}
If you want to avoid using Ajax (i.e. using Wicket) to make it read-only then you should do it with custom JavaScript. E.g. using jQuery:
i.e. set
disabled="disabled"attribute to the HTMLSelectElement on the first change event.