Commit 5a06f57c authored by michael.simon's avatar michael.simon
Browse files

make users pageable in master admin group view

parent 91409e3b
......@@ -185,4 +185,8 @@ public class GroupAdminShowLocalGroupBean implements Serializable {
public List<UserEntity> getMemberList() {
return memberList;
}
public ServiceEntity getServiceEntity() {
return serviceEntity;
}
}
......@@ -11,6 +11,7 @@
package edu.kit.scc.webreg.bean.admin.group;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
......@@ -20,6 +21,8 @@ import javax.inject.Inject;
import edu.kit.scc.webreg.entity.HomeOrgGroupEntity;
import edu.kit.scc.webreg.entity.ServiceGroupFlagEntity;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.entity.UserGroupEntity;
import edu.kit.scc.webreg.service.HomeOrgGroupService;
import edu.kit.scc.webreg.service.ServiceGroupFlagService;
......@@ -38,13 +41,18 @@ public class ShowHomeOrgGroupBean implements Serializable {
private HomeOrgGroupEntity entity;
private List<ServiceGroupFlagEntity> groupFlagList;
private List<UserEntity> memberList;
private Long id;
public void preRenderView(ComponentSystemEvent ev) {
if (entity == null) {
entity = groupService.findWithUsers(id);
groupFlagList = groupFlagService.findByGroup(entity);
memberList = new ArrayList<UserEntity>();
for (UserGroupEntity ug : entity.getUsers()) {
memberList.add(ug.getUser());
}
}
}
......@@ -72,4 +80,8 @@ public class ShowHomeOrgGroupBean implements Serializable {
public List<ServiceGroupFlagEntity> getGroupFlagList() {
return groupFlagList;
}
public List<UserEntity> getMemberList() {
return memberList;
}
}
......@@ -79,34 +79,40 @@
<div class="panel">
<p:panel id="attrPanel" header="#{messages.members}">
<p:dataTable id="attrData" style="min-width: 500px;"
value="#{showHomeOrgGroupBean.entity.users.toArray()}" var="userGroup">
<p:column>
<p:dataTable id="allUsersTable" var="user" value="#{showHomeOrgGroupBean.memberList}" paginator="true"
lazy="true" rows="15">
<p:column sortBy="#{user.id}">
<f:facet name="header">
<h:outputText value="#{messages.id}" />
</f:facet>
<h:outputText value="#{userGroup.user.id}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{messages.eppn}" />
</f:facet>
<h:link outcome="/admin/user/show-user.xhtml" value="#{userGroup.user.eppn}">
<f:param name="id" value="#{userGroup.user.id}"/>
</h:link>
<h:outputText value="#{user.id}" />
</p:column>
<p:column>
<p:column sortBy="#{user.surName}" filterBy="#{user.surName}">
<f:facet name="header">
<h:outputText value="#{messages.sur_name}" />
</f:facet>
<h:outputText value="#{userGroup.user.surName}" />
</p:column>
<p:column>
<h:outputText value="#{user.surName}" />
</p:column>
<p:column sortBy="#{user.givenName}" filterBy="#{user.givenName}">
<f:facet name="header">
<h:outputText value="#{messages.given_name}" />
</f:facet>
<h:outputText value="#{userGroup.user.givenName}" />
<h:outputText value="#{user.givenName}" />
</p:column>
<p:column sortBy="#{user.eppn}" filterBy="#{user.eppn}">
<f:facet name="header">
<h:outputText value="#{messages.eppn}" />
</f:facet>
<h:link outcome="/admin/user/show-user.xhtml" value="#{user.eppn}">
<f:param name="id" value="#{user.id}"/>
</h:link>
</p:column>
<p:column sortBy="#{user.userStatus}">
<f:facet name="header">
<h:outputText value="#{messages.status}" />
</f:facet>
<h:outputText value="#{user.userStatus}" />
</p:column>
</p:dataTable>
</p:panel>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment