Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1) I load the application
- 2) There is one user in the database with role 'admin'
- 3) I try to edit this user and the dialog opens up, 'admin' checkbox is selected.
- 4) I click the 'user' role checkbox and click submit
- 5) The selectedRoles array is still only just 'admin' instead of 'admin' and 'user'
- <p:dialog header="Editing User ID: #{usersView.viewUser}" id="editUserDialog" widgetVar="editUserDialog" modal="true" appendTo="@(body)"
- <h:form id="editUserForm">
- <p:selectManyCheckbox id="roleSelect" value="#{usersView.selectedRoles}" layout="grid" columns="3">
- <f:selectItems value="#{rolesView.roles} var="role" itemLabel="#{role.name}" itemValue="#{role.name}" />
- </p:selectManyCheckbox>
- <p:separator />
- <p:commandButton process="@this" update=":form:tabs:adminView:userTable:userRoleOutput" value="Submit" id="EditUserSubmitButton" actionListener="#{usersView.editUserRole}" oncomplete="PF('editUserDialog').hide();" />
- </h:form>
- </p:dialog>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement