use of org.olat.course.nodes.cl.ui.CheckboxConfigRow in project OpenOLAT by OpenOLAT.
the class CheckboxListStepController method updateModel.
private void updateModel() {
List<Checkbox> boxList = data.getCheckboxList();
List<CheckboxConfigRow> rows = new ArrayList<>();
for (Checkbox box : boxList) {
rows.add(new CheckboxConfigRow(box, null));
}
model.setObjects(rows);
boxTable.reset();
}
use of org.olat.course.nodes.cl.ui.CheckboxConfigRow in project OpenOLAT by OpenOLAT.
the class CheckboxListStepController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addLink == source) {
Checkbox checkbox = new Checkbox();
checkbox.setCheckboxId(UUID.randomUUID().toString());
String title = translate("add.checkbox");
doOpenEdit(ureq, checkbox, true, title);
} else if (boxTable == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("edit".equals(cmd)) {
CheckboxConfigRow row = model.getObject(se.getIndex());
doOpenEdit(ureq, row.getCheckbox(), false, translate("edit.checkbox"));
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.course.nodes.cl.ui.CheckboxConfigRow in project openolat by klemens.
the class CheckboxListStepController method updateModel.
private void updateModel() {
List<Checkbox> boxList = data.getCheckboxList();
List<CheckboxConfigRow> rows = new ArrayList<>();
for (Checkbox box : boxList) {
rows.add(new CheckboxConfigRow(box, null));
}
model.setObjects(rows);
boxTable.reset();
}
use of org.olat.course.nodes.cl.ui.CheckboxConfigRow in project openolat by klemens.
the class CheckboxListStepController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addLink == source) {
Checkbox checkbox = new Checkbox();
checkbox.setCheckboxId(UUID.randomUUID().toString());
String title = translate("add.checkbox");
doOpenEdit(ureq, checkbox, true, title);
} else if (boxTable == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("edit".equals(cmd)) {
CheckboxConfigRow row = model.getObject(se.getIndex());
doOpenEdit(ureq, row.getCheckbox(), false, translate("edit.checkbox"));
}
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations