Commit f184beb1 authored by michael.simon's avatar michael.simon
Browse files

use multipath or capability

parent 6bf8f78b
......@@ -21,6 +21,9 @@ import javax.faces.event.ComponentSystemEvent;
import javax.inject.Inject;
import edu.kit.scc.webreg.dao.GenericSortOrder;
import edu.kit.scc.webreg.dao.ops.MultipathOrPredicate;
import edu.kit.scc.webreg.dao.ops.OrPredicate;
import edu.kit.scc.webreg.dao.ops.PathObjectValue;
import edu.kit.scc.webreg.entity.UserEntity;
import edu.kit.scc.webreg.sec.AuthorizationBean;
import edu.kit.scc.webreg.service.UserService;
......@@ -84,7 +87,11 @@ public class TokenAdminIndexBean implements Serializable {
public List<UserEntity> completeUser(String part) {
Map<String, Object> filterMap = new HashMap<String, Object>();
filterMap.put("eppn", part);
filterMap.put("eppn", new MultipathOrPredicate(
new PathObjectValue("eppn", part),
new PathObjectValue("surName", part),
new PathObjectValue("givenName", part)
));
return userService.findAllPaging(0, 10, "eppn", GenericSortOrder.ASC, filterMap);
}
......
......@@ -27,7 +27,7 @@
<p:panelGrid columns="2">
<h:outputLabel value="Eppn" for="@next" />
<p:autoComplete id="userAutocompl" multiple="false" value="#{tokenAdminIndexBean.selectedUser}"
completeMethod="#{tokenAdminIndexBean.completeUser}"
completeMethod="#{tokenAdminIndexBean.completeUser}" minQueryLength="2"
var="u" itemLabel="#{u.eppn}" itemValue="#{u}" converter="#{userConverter}"
forceSelection="true">
<p:column style="width:20%">
......
Supports Markdown
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