1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
<!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:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:outputStylesheet name="panel.ecss"/>
<h:head></h:head>
<h:body>
<f:facet name="header">Mon arbre</f:facet>
<h:form>
<div id="treeBloc" >
<h:panelGrid columns="2" columnClasses="top,top" width="100%">
<rich:tree id="tree" nodeType="#{node.type}" var="node"
value="#{refItemController.myTree}" toggleType="client"
selectionType="ajax"
selectionChangeListener="#{refItemController.selectionChanged}">
<rich:treeNode id="arbo" type="arbo" iconCollapsed="/images/tree/RefBati.png"
iconExpanded="/images/tree/RefBati.png"
iconLeaf="/images/tree/RefBati.png">
<a4j:outputPanel layout="block">
<rich:dropTarget acceptedTypes="leaf" dropValue="CF" render="tree" />
<h:outputText value="#{node.name}" />
</a4j:outputPanel>
</rich:treeNode>
<rich:treeNode type="bati" iconCollapsed="/images/tree/Maison.png"
iconExpanded="/images/tree/Maison.png"
iconLeaf="/images/tree/Maison.png">
<a4j:outputPanel layout="block">
<rich:dragIndicator id="ind" draggingClass="rf-ind-drag">
<h:outputText value="#{node.name}" />
</rich:dragIndicator>
<h:outputText title="#{batimentController.building.batiType(node.id_batimenttype).libelle}" value="#{node.name}" style="#{batimentController.building.batiTypeStyle(node.id_batimenttype)}" />
<rich:dragSource type="leaf" dragValue="#{node}" dragIndicator="ind" />
</a4j:outputPanel>
</rich:treeNode>
</rich:tree>
</div>
<!-- **** Ensemble du panelGroup ci dessous doit rester fixe **** -->
<h:panelGroup rendered="true">
<a4j:outputPanel ajaxRendered="true" layout="block">
<rich:collapsiblePanel
header="#{refItemController.currentSelection.name}"
switchType="client">
<h:panelGrid columns="2" columnClasses="bold" width="100%" rendered="#{refItemController.currentSelection.type.equals('bati')}">
<h:outputText value="Adresse :" />
<h:outputText value="#{refItemController.currentSelection.numero} #{refItemController.currentSelection.bis} #{refItemController.currentSelection.rue}" />
<h:outputText value="" />
<h:outputText value="#{refItemController.currentSelection.codepostal} #{refItemController.currentSelection.commune}" />
<h:outputText value="Statut :" />
<h:outputText value="#{batimentController.building.batiType(refItemController.currentSelection.id_batimenttype).libelle}" />
<h:outputText value="Remarques :" />
<h:outputText value="#{refItemController.currentSelection.remarques}" escape="false" />
</h:panelGrid>
<h:panelGrid columnClasses="bold" width="100%" rendered="#{refItemController.currentSelection.type.equals('bati')}">
<a4j:commandButton value="Ajouter une remarque" action="#{refItemController.changeBool(refItemController.remarquesBool)}" reRender="ajoutRemarques" />
<a4j:outputPanel id="ajoutRemarques">
<h:panelGroup>
<h:inputTextarea value="#{refItemController.remarques}" rendered="#{refItemController.remarquesBool}" cols="60" rows="4" />
<a4j:commandButton value="Maj" action="#{refItemController.majBatiment}" rendered="#{refItemController.remarquesBool}" style="top:100%" />
</h:panelGroup>
</a4j:outputPanel>
</h:panelGrid>
</rich:collapsiblePanel>
<rich:collapsiblePanel header="CARNET DE SANTE" expanded="false"
switchType="client" rendered="#{refItemController.currentSelection.type.equals('bati')}">
<h:dataTable id="tabCarnet" value="#{refItemController.listeStructure}" var="structure">
<h:column>
<h:outputText value="#{structure.basName}" />
</h:column>
<h:column>
<h:inputText value="#{refItemController.listeCarnet[1]}" />
</h:column>
</h:dataTable>
</rich:collapsiblePanel>
<rich:collapsiblePanel header="COLBERT" expanded="false"
switchType="ajax">
<h:panelGrid columns="2" columnClasses="bold" width="100%">
<h:outputText value="Code objet :" />
<h:outputText
value="#{refItemController.currentSelection.refexterne}" />
</h:panelGrid>
</rich:collapsiblePanel>
</a4j:outputPanel>
</h:panelGroup>
</h:panelGrid>
</h:form>
</h:body>
</html> |
Partager