view src/main/webapp/home/mainPage.xhtml @ 5:5316e79f9a27

Implementation of search pagination and lazy loading to display the result set of a search.
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Mon, 16 Mar 2015 11:25:36 +0100
parents 7682c04c63a8
children
line wrap: on
line source

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ace="http://www.icefaces.org/icefaces/components"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:cl="http://java.sun.com/jsf/composite/jsf/cl"
	template="../templates/publicTemplate.xhtml">
	
	<ui:define name="content">
		
			<ice:form styleClass="content">
				<ice:outputLabel value="User's Branches" styleClass="subTitle"/>
				
					
					<h:panelGrid columns="1" rendered="#{!empty sessionBean.branches}" style="width: 90%; margin-left: auto;margin-right: auto;">
						<ace:dataTable value="#{sessionBean.branches}" var="soBranch">
							 
							 <ace:column headerText="ID">
							 	<h:outputText value="#{soBranch.obj.id}"/>
							 </ace:column>
							 <ace:column headerText="Book ID">
							 	<h:outputText value="#{soBranch.obj.book.id}"/>
							 </ace:column>
							 <ace:column headerText="Book Name">
							 	<h:outputText value="#{soBranch.obj.book.name}"/>
							 </ace:column>
							 <ace:column headerText="Section ID">
							 	<h:outputText value="#{soBranch.obj.sectionId}"/>
							 </ace:column>
							 <ace:column headerText="Section Name">
							 	<h:outputText value="#{soBranch.obj.sectionName}"/>
							 </ace:column>
							 <ace:column headerText="Label">
							 	<h:outputText value="#{soBranch.obj.label}"/>
							 </ace:column>
							 <ace:column headerText="Contributors">
							 	<ace:dataTable value="#{soBranch.obj.contributorsNameList}" var="contributor">
							 		<ace:column>
							 			<h:outputLabel value="#{contributor}"/>
							 		</ace:column>
							 	</ace:dataTable>
							 </ace:column>
							 <ace:column headerText="Creation">
							 	<h:outputText value="#{soBranch.obj.fomattedCreation}"/>
							 </ace:column>
							 <ace:column headerText="Las Change">
							 	<h:outputText value="#{soBranch.obj.fomattedLastChange}"/>
							 </ace:column>
							 <ace:column headerText="Extraction Interface">
							 	<h:commandButton value="Load" 
									onclick="branchInExtractionInterface(#{soBranch.obj.id}, #{soBranch.obj.currentLastFileId}, #{soBranch.obj.sectionId}, '#{soBranch.obj.sectionName}', #{soBranch.obj.book.id}, '#{soBranch.obj.book.name}', #{sessionBean.user.id}, '#{appBean.extractionInterfaceUrl}');"
									image="#{appBean.showImage}"
									title="Show Branch in Extraction Interface"/>
							 </ace:column>
							 <ace:column headerText="Dataverse">
							 	<h:commandButton value="Publish file" image="#{appBean.publishImage}"
							 		title="Publish in Dataverse (TODO)"/>
							 </ace:column>
							 <ace:column headerText="Manage">
								<h:outputLink 
									value="#{appBean.rootServer}/home/branchEditor.xhtml?branchId=#{soBranch.obj.id}"
									title="Manage Branch">
									<h:graphicImage value="#{appBean.editBranchImage}"/>
								</h:outputLink>
							 </ace:column>
							 <ace:column headerText="Select">
							 	<h:selectBooleanCheckbox value="#{soBranch.selected}"/>
							 </ace:column>
						</ace:dataTable>	
						<h:panelGrid columns="2">
							<h:commandButton value="Reload" actionListener="#{sessionBean.listenerReloadBranches}"/>
							<h:commandButton value="Delete" actionListener="#{sessionBean.listenerDeleteBranch}" onclick="#{appBean.JSConfirmationDelete}"/>
						</h:panelGrid>
					</h:panelGrid>
				
			
				
			</ice:form>
			
	</ui:define>
	
		
	
</ui:composition>