Commit 1908ecdd authored by michael.simon's avatar michael.simon
Browse files

List get loaded completely, but filtarable and sortable

parent 17544d45
......@@ -29,6 +29,7 @@ import edu.kit.scc.webreg.entity.ServiceEntity;
import edu.kit.scc.webreg.entity.ServiceGroupFlagEntity;
import edu.kit.scc.webreg.entity.ServiceGroupStatus;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.entity.UserGroupEntity;
import edu.kit.scc.webreg.event.EventSubmitter;
import edu.kit.scc.webreg.event.MultipleGroupEvent;
import edu.kit.scc.webreg.exc.EventSubmitException;
......@@ -74,7 +75,7 @@ public class GroupAdminShowLocalGroupBean implements Serializable {
@Inject
private EventSubmitter eventSubmitter;
private LocalGroupEntity entity;
private ServiceEntity serviceEntity;
......@@ -82,6 +83,7 @@ public class GroupAdminShowLocalGroupBean implements Serializable {
private List<ServiceGroupFlagEntity> groupFlagList;
private List<UserEntity> effectiveMemberList;
private List<UserEntity> memberList;
private Long serviceId;
private Long groupId;
......@@ -108,6 +110,10 @@ public class GroupAdminShowLocalGroupBean implements Serializable {
if (groupFlagList.size() == 0)
throw new NotAuthorizedException("Gruppe ist diesem Service nicht zugeordnet");
effectiveMemberList = new ArrayList<UserEntity>(allGroupService.getEffectiveMembers(entity));
memberList = new ArrayList<UserEntity>();
for (UserGroupEntity ug : entity.getUsers()) {
memberList.add(ug.getUser());
}
}
public void handleSave() {
......@@ -175,4 +181,8 @@ public class GroupAdminShowLocalGroupBean implements Serializable {
public Boolean getEditable() {
return editable;
}
public List<UserEntity> getMemberList() {
return memberList;
}
}
......@@ -56,24 +56,24 @@
<div class="panel">
<p:panel id="memberPanel" header="#{messages.members}">
<p:dataTable id="memberData" style="min-width: 500px;"
value="#{groupAdminShowLocalGroupBean.entity.users.toArray()}" var="userGroup">
<p:column>
value="#{groupAdminShowLocalGroupBean.memberList}" var="user">
<p:column sortBy="#{user.eppn}" filterBy="#{user.eppn}">
<f:facet name="header">
<h:outputText value="#{messages.eppn}" />
</f:facet>
<h:outputText value="#{userGroup.user.eppn}" />
<h:outputText value="#{user.eppn}" />
</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}" />
<h:outputText value="#{user.surName}" />
</p:column>
<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:dataTable>
......
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