add(new DropDownChoice<AppointmentReminderTyps>(
"remind"
, remindTypes
, new ChoiceRenderer<AppointmentReminderTyps>("label.value", "typId")));
final DropDownChoice<RoomType> roomType = new RoomTypeDropDown("room.roomtype");
roomType.setEnabled(createRoom);
roomType.setOutputMarkupId(true);
add(roomType);
final DropDownChoice<Room> room = new DropDownChoice<Room>(
"room"
, getRoomList()
, new ChoiceRenderer<Room>("name", "rooms_id"));
room.setEnabled(!createRoom);
room.setOutputMarkupId(true);
add(room);
add(new AjaxCheckBox("createRoom", new PropertyModel<Boolean>(this, "createRoom")) {
private static final long serialVersionUID = -3743113990890386035L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
createRoom = getConvertedInput();
target.add(roomType.setEnabled(createRoom), room.setEnabled(!createRoom));
}
});
add(new AjaxCheckBox("passwordProtected") {
private static final long serialVersionUID = 6041200584296439976L;