Mercurial > hg > ismi-richfaces
view src/main/webapp/merge/importMerge.xhtml @ 97:13b313ae1af8
new import-merge works now.
author | casties |
---|---|
date | Fri, 28 Oct 2016 18:21:07 +0200 |
parents | 895bf7494d17 |
children | 9b02c9af49b0 |
line wrap: on
line source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <body> <ui:composition template="/templates/privateTemplate.xhtml"> <ui:define name="privateContent"> <div id="pageTitle"> <h:outputText value="Merge Import List" /> </div> <h:panelGrid rendered="#{Session.user != null}" styleClass="mainPanel" id="mainPanel" columns="1"> <h:panelGrid columns="2" styleClass="createPanel" columnClasses="createPanelFirstColumn" id="loadListPanel"> <h:outputText value="Import File" /> <h:panelGrid columns="3"> <h:outputText value="#{Session.importMerge.importFilename}" /> <a4j:commandButton value="Load" actionListener="#{Session.importMerge.loadImportFile}" render="mainPanel,loadListPanel,loadingPanel,mergingPanel" /> <h:outputText value="#{Session.importMerge.importFileMsg}" rendered="#{!empty Session.importMerge.importFileMsg}" styleClass="textBack"/> </h:panelGrid> </h:panelGrid> <h:panelGrid columns="2" styleClass="createPanel" columnClasses="createPanelFirstColumn" id="loadingPanel" rendered="#{Session.importMerge.getImportNodeListLength() > 0}"> <h:outputText value="Import Nodes" /> <h:panelGrid columns="3"> <h:outputText value="Node #{Session.importMerge.importNodeIdx + 1} / #{Session.importMerge.importNodeListLength}" styleClass="textBack"/> <a4j:commandButton value="Skip" actionListener="#{Session.importMerge.skipCurrentNode}" render="loadingPanel,mergingPanel" /> <h:column> <h:outputText value="#{Session.importMerge.importNodeAsText}" rendered="#{Session.importMerge.importNode != null}" styleClass="textBack"/> </h:column> <h:outputText/> <a4j:commandButton value="Load" actionListener="#{Session.importMerge.loadFirstEntity}" render="loadingPanel,mergingPanel" /> <h:outputText value="#{Session.importMerge.importNodeMsg}" rendered="#{! empty Session.importMerge.importNodeMsg}" styleClass="textBack"/> </h:panelGrid> </h:panelGrid> <h:panelGrid columns="1" id="mergingPanel"> <h:outputText value="Merge Mapping" rendered="#{Session.importMerge.entitiesLoaded}" styleClass="titlePanel"/> <h:panelGrid columns="3" styleClass="createPanel" columnClasses="createPanelFirstColumn,createPanelColumn02,createPanelColumn02" rendered="#{Session.importMerge.entitiesLoaded}"> <h:outputText value="ID" /> <h:outputText value="#{Session.importMerge.firstEntity.getId()}" /> <h:outputText value="#{Session.importMerge.secondEntity.getId()}" /> <h:outputText value="Class" /> <h:outputText value="#{Session.importMerge.firstEntity.getObjectClass()}" /> <h:outputText value="#{Session.importMerge.secondEntity.getObjectClass()}" /> </h:panelGrid> <h:panelGrid columns="2" styleClass="createPanel" columnClasses="createPanelFirstColumn,createPanelColumn02,createPanelColumn02" rendered="#{Session.importMerge.entitiesLoaded}"> <h:outputText value="Attributes" /> <rich:dataTable var="attName" value="#{Session.importMerge.attLabels}" rendered="#{!empty Session.importMerge.attLabels}"> <h:column> <f:facet name="header"> <h:outputText value="Attribute Name" /> </f:facet> <h:outputText value="#{attName}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Value Old Entity" /> </f:facet> <h:outputText value="#{Session.importMerge.firstAttMap[attName]}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Value New Entity" /> </f:facet> <h:outputText value="#{Session.importMerge.secondAttMap[attName]}" /> </h:column> <h:column style="width:300px;"> <f:facet name="header"> <h:outputText value="Select Value" /> </f:facet> <h:selectOneRadio value="#{Session.importMerge.selectedAtts[attName]}"> <f:selectItems value="#{Session.importMerge.attSelectItems}" /> </h:selectOneRadio> </h:column> </rich:dataTable> </h:panelGrid> <h:panelGrid columns="3" styleClass="createPanel" columnClasses="createPanelFirstColumn,createPanelColumn02,createPanelColumn02" rendered="#{Session.importMerge.entitiesLoaded}"> <h:outputText value="Source Relations" /> <h:panelGrid columns="1"> <rich:dataTable var="srcRelation" rendered="#{!empty Session.importMerge.firstEntity.sourceRelations}" value="#{Session.importMerge.firstEntity.sourceRelations}"> <h:column> <f:facet name="header"> <h:outputText value="Relation Name" /> </f:facet> <h:outputText value="#{srcRelation.ownValue}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="linked to this" /> </f:facet> <h:outputText value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}-#{srcRelation.targetId}]" /> </h:column> <h:column> <h:selectOneRadio value="#{Session.importMerge.selectedFirstSrcRelations[srcRelation.id]}"> <f:selectItems value="#{Session.importMerge.relSelectItems}" /> </h:selectOneRadio> </h:column> </rich:dataTable> <h:outputText value="The old entity does not have source relations" rendered="#{empty Session.importMerge.firstEntity.sourceRelations}" /> </h:panelGrid> <h:panelGrid columns="1"> <rich:dataTable var="srcRelation" rendered="#{!empty Session.importMerge.secondEntity.sourceRelations}" value="#{Session.importMerge.secondEntity.sourceRelations}"> <h:column> <f:facet name="header"> <h:outputText value="Relation Name" /> </f:facet> <h:outputText value="#{srcRelation.ownValue}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="linked to this" /> </f:facet> <h:outputText value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}-#{srcRelation.targetId}]" /> </h:column> <h:column> <h:selectOneRadio value="#{Session.importMerge.selectedSecondSrcRelations[srcRelation.id]}"> <f:selectItems value="#{Session.importMerge.relSelectItems}" /> </h:selectOneRadio> </h:column> </rich:dataTable> <h:outputText value="The new entity does not have source relations" rendered="#{empty Session.importMerge.secondEntity.sourceRelations}" /> </h:panelGrid> <h:outputText value="Target Relations" /> <h:panelGrid columns="1"> <rich:dataTable var="tarRelation" rendered="#{!empty Session.importMerge.firstEntity.targetRelations}" value="#{Session.importMerge.firstEntity.targetRelations}" style="width:60%;"> <h:column> <f:facet name="header"> <h:outputText value="linked from this" /> </f:facet> <h:outputText value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}-#{tarRelation.sourceId}]" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Relation Name" /> </f:facet> <h:outputText value="#{tarRelation.ownValue}" /> </h:column> <h:column> <h:selectOneRadio value="#{Session.importMerge.selectedFirstTarRelations[tarRelation.id]}"> <f:selectItems value="#{Session.importMerge.relSelectItems}" /> </h:selectOneRadio> </h:column> </rich:dataTable> <h:outputText value="The old entity does not have target relations." rendered="#{empty Session.importMerge.firstEntity.targetRelations}" /> </h:panelGrid> <h:panelGrid columns="1"> <rich:dataTable var="tarRelation" rendered="#{!empty Session.importMerge.secondEntity.targetRelations}" value="#{Session.importMerge.secondEntity.targetRelations}" style="width:60%;"> <h:column> <f:facet name="header"> <h:outputText value="linked from this" /> </f:facet> <h:outputText value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}-#{tarRelation.sourceId}]" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Relation Name" /> </f:facet> <h:outputText value="#{tarRelation.ownValue}" /> </h:column> <h:column> <h:selectOneRadio value="#{Session.importMerge.selectedSecondTarRelations[tarRelation.id]}"> <f:selectItems value="#{Session.importMerge.relSelectItems}" /> </h:selectOneRadio> </h:column> </rich:dataTable> <h:outputText value="The new entity does not have target relations" rendered="#{empty Session.importMerge.secondEntity.targetRelations}" /> </h:panelGrid> </h:panelGrid> <h:panelGrid columns="2" styleClass="controlPanel" rendered="#{Session.importMerge.entitiesLoaded}"> <a4j:commandButton value="Preview" actionListener="#{Session.importMerge.preview}" rendered="#{Session.importMerge.entitiesLoaded}" render="mergingPanel" /> <a4j:commandButton value="Execute Merge" actionListener="#{Session.importMerge.listenerExecuteMerge }" rendered="#{Session.importMerge.entitiesLoaded}" onclick="#{ApplicationBean1.JSConfirmationMerge}" render="mergingPanel" /> </h:panelGrid> <h:outputText value="Entity Preview" rendered="#{Session.importMerge.entResult != null}" styleClass="titlePanel"/> <h:panelGrid columns="2" styleClass="createPanel" columnClasses="createPanelFirstColumn" rendered="#{Session.importMerge.entResult != null}"> <h:outputText value="ID"/> <h:outputText value="#{Session.importMerge.entResult.getId()}" styleClass="textBack"/> <h:outputText value="Class"/> <h:outputText value="#{Session.importMerge.entResult.getObjectClass()}" styleClass="textBack"/> <h:outputText value="Attributes" /> <rich:dataTable value="#{Session.importMerge.entResult.attributes}" var="attribute" border="1"> <h:column> <f:facet name="header"> <h:outputText value="Name" /> </f:facet> <h:outputText value="#{attribute.objectClass}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Value" /> </f:facet> <h:outputText value="#{attribute.ownValue}" /> </h:column> </rich:dataTable> <h:outputText value="Source Relations" /> <rich:dataTable value="#{Session.importMerge.entResult.sourceRelations}" var="srcRelation" border="1"> <h:column> <f:facet name="header"> <h:outputText value="linked from this" /> </f:facet> <h:outputText value="#{'x'}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Relation Name" /> </f:facet> <h:outputText value="#{srcRelation.ownValue}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="linked to this" /> </f:facet> <h:outputText value="#{srcRelation.target.ownValue} [#{srcRelation.target.objectClass}]" /> </h:column> </rich:dataTable> <h:outputText value="Target Relations" /> <rich:dataTable value="#{Session.importMerge.entResult.targetRelations}" var="tarRelation" border="1"> <h:column> <f:facet name="header"> <h:outputText value="linked from this" /> </f:facet> <h:outputText value="#{tarRelation.source.ownValue} [#{tarRelation.source.objectClass}]" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Relation Name" /> </f:facet> <h:outputText value="#{tarRelation.ownValue}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="linked to this" /> </f:facet> <h:outputText value="#{'x'}" /> </h:column> </rich:dataTable> </h:panelGrid> </h:panelGrid> </h:panelGrid> </ui:define> </ui:composition> </body> </html>