GeoServerRoleService roleService = getSecurityManager().getActiveRoleService(); final String roleServiceName = roleService.getName(); add(new Label("roles", new StringResourceModel("roles",this,null))); else add(new Label("roles", new StringResourceModel("rolesFromActiveService", this,null,new Object[] {roleServiceName}))); add(new SubmitLink("addRole") { @Override public void onSubmit() {
public void diff( Collection<GeoServerRole> orig, Collection<GeoServerRole> add, Collection<GeoServerRole> remove) { remove.addAll(orig); for (GeoServerRole role : getSelectedRoles()) { if (!orig.contains(role)) { add.add(role); } else { remove.remove(role); } } }
form.add(rolePalette = new RolePaletteFormComponent("roles", new ListModel(roles))); rolePalette.add(new AjaxFormComponentUpdatingBehavior("onchange") { @Override protected void onUpdate(AjaxRequestTarget target) { rolePalette.setOutputMarkupId(true); rolePalette.setEnabled(hasRoleStore);
form.add(rolePalette = new RolePaletteFormComponent("roles", new Model((Serializable)roles))); rolePalette.setEnabled(hasRoleStore);
Set<GeoServerRole> add = new HashSet<GeoServerRole>(); Set<GeoServerRole> remove = new HashSet<GeoServerRole>(); rolePalette.diff(orig, add, remove);
form.add(rolePalette = new RolePaletteFormComponent("roles", new ListModel(roles))); rolePalette.add(new AjaxFormComponentUpdatingBehavior("onchange") { @Override protected void onUpdate(AjaxRequestTarget target) { rolePalette.setOutputMarkupId(true); rolePalette.setEnabled(hasRoleStore);
form.add(rolePalette = new RolePaletteFormComponent("roles", new Model((Serializable)roles))); rolePalette.setEnabled(hasRoleStore);
Set<GeoServerRole> add = new HashSet<GeoServerRole>(); Set<GeoServerRole> remove = new HashSet<GeoServerRole>(); rolePalette.diff(orig, add, remove);
form.add(rolePalette = new RolePaletteFormComponent("roles", new ListModel(roles))); rolePalette.add( new AjaxFormComponentUpdatingBehavior("change") { @Override rolePalette.setOutputMarkupId(true); rolePalette.setEnabled(hasRoleStore);
public void diff(Collection<GeoServerRole> orig, Collection<GeoServerRole> add, Collection<GeoServerRole> remove) { remove.addAll(orig); for(GeoServerRole role : getSelectedRoles()) { if (!orig.contains(role)) { add.add(role); } else { remove.remove(role); } } }
GeoServerRoleService roleService = getSecurityManager().getActiveRoleService(); final String roleServiceName = roleService.getName(); add(new Label("roles", new StringResourceModel("roles",this,null))); else add(new Label("roles", new StringResourceModel("rolesFromActiveService", this,null,new Object[] {roleServiceName}))); add(new SubmitLink("addRole") { @Override public void onSubmit() {
new RolePaletteFormComponent("roles", new Model((Serializable) roles))); rolePalette.setEnabled(hasRoleStore);
Set<GeoServerRole> add = new HashSet<GeoServerRole>(); Set<GeoServerRole> remove = new HashSet<GeoServerRole>(); rolePalette.diff(orig, add, remove);
public void diff(Collection<GeoServerRole> orig, Collection<GeoServerRole> add, Collection<GeoServerRole> remove) { remove.addAll(orig); for(GeoServerRole role : getSelectedRoles()) { if (!orig.contains(role)) { add.add(role); } else { remove.remove(role); } } }
GeoServerRoleService roleService = getSecurityManager().getActiveRoleService(); final String roleServiceName = roleService.getName(); add(new Label("roles", new StringResourceModel("roles", this))); else add( new Label( "roles", .setParameters(roleServiceName))); add( new SubmitLink("addRole") { @Override
Set<GeoServerRole> add = new HashSet<GeoServerRole>(); Set<GeoServerRole> remove = new HashSet<GeoServerRole>(); rolePalette.diff(orig, add, remove);
void updateGroupAdminList(AjaxRequestTarget target) { adminGroupChoice.setEnabled( rolePalette.getSelectedRoles().contains(GeoServerRole.GROUP_ADMIN_ROLE)); target.addComponent(adminGroupChoice); }
Set<GeoServerRole> add = new HashSet<GeoServerRole>(); Set<GeoServerRole> remove = new HashSet<GeoServerRole>(); rolePalette.diff(orig, add, remove);
void updateGroupAdminList(AjaxRequestTarget target) { adminGroupChoice.setEnabled( rolePalette.getSelectedRoles().contains(GeoServerRole.GROUP_ADMIN_ROLE)); target.addComponent(adminGroupChoice); }
Set<GeoServerRole> add = new HashSet<GeoServerRole>(); Set<GeoServerRole> remove = new HashSet<GeoServerRole>(); rolePalette.diff(orig, add, remove);