Maintain project selection on validation failure during group creation (#133)
Fixes #129 ## How to test 1. Log in as `evan@example.com` 2. Go to "My groups" 3. Click "Create new group" 4. Select some projects but do *not* fill in the "Title" 5. Click save 6. Error message should be presented 7. Project selection should be maintained Co-authored-by: Nico Athanassiadis <nico@dsv.su.se> Reviewed-on: #133 Reviewed-by: Nico Athanassiadis <nico@dsv.su.se> Co-authored-by: Andreas Svanberg <andreass@dsv.su.se> Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
This commit is contained in:
parent
9ede262e7b
commit
59e3ec3fd9
@ -59,6 +59,11 @@ public class EditGroupPanel extends Panel {
|
||||
});
|
||||
add(
|
||||
new ListView<>("available_projects", availableProjects) {
|
||||
{
|
||||
// must re-use list items to maintain form component (checkboxes) state
|
||||
setReuseItems(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void populateItem(ListItem<Project> item) {
|
||||
CheckBox checkbox = new CheckBox("selected", new SelectProjectModel(model, item.getModel()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user