Mercurial > hg > ismi-richfaces
changeset 179:c9dec00f0f17
add "show private" to browse all function.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 08 Jun 2018 18:59:49 +0200 |
parents | ca83d67a2dc9 |
children | 0d31c8be7c31 |
files | src/main/java/de/mpiwg/itgroup/ismi/browse/AbstractEntityRepositoryBean.java src/main/webapp/browse/entityRepository.xhtml |
diffstat | 2 files changed, 19 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/ismi/browse/AbstractEntityRepositoryBean.java Fri Jun 08 18:28:58 2018 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/browse/AbstractEntityRepositoryBean.java Fri Jun 08 18:59:49 2018 +0200 @@ -319,11 +319,10 @@ } } - public void searchByPublic() { + public void searchByPublic(boolean isPublic) { this.resultMode = MODE_ADVANCED; this.setPage(""); this.currentEntities = new ArrayList<Entity>(); - boolean isPublic = true; this.entities = getWrapper().searchEntityByPublic(objectClass, isPublic); this.resultSummaryMsg = ""; @@ -378,7 +377,7 @@ public String actionSearchByPublic() { try { - this.searchByPublic(); + this.searchByPublic(true); } catch (Exception e) { printInternalError(e); logger.error(e.getMessage(), e); @@ -387,6 +386,17 @@ return GOTO_ENTITY_REPOSITORY; } + public String actionSearchByPrivate() { + try { + this.searchByPublic(false); + } catch (Exception e) { + printInternalError(e); + logger.error(e.getMessage(), e); + } + + return GOTO_ENTITY_REPOSITORY; + } + public boolean isAdvancedSearch() { return advancedSearch; }
--- a/src/main/webapp/browse/entityRepository.xhtml Fri Jun 08 18:28:58 2018 +0200 +++ b/src/main/webapp/browse/entityRepository.xhtml Fri Jun 08 18:59:49 2018 +0200 @@ -51,6 +51,12 @@ render="browseAttPanel" /> </rich:tab> + <rich:tab header="Show private" name="Show private"> + <a4j:commandButton value="Submit" + action="#{EntityRepository.actionSearchByPrivate}" styleClass="button" + render="browseAttPanel" /> + </rich:tab> + <rich:tab header="Search by attributes" name="Search by attributes"> <h:panelGrid id="browseAttPanel"> <h:panelGrid columns="2"