Changing interface from panned to tabbed, for better usability and visualization.
authorMichele Silva <michele.silva@gmail.com>
Tue, 24 Jan 2012 17:19:19 +0000 (15:19 -0200)
committerMichele Silva <michele.silva@gmail.com>
Tue, 24 Jan 2012 17:19:19 +0000 (15:19 -0200)
web/bn.xhtml

index b31236f..11bc566 100644 (file)
@@ -16,7 +16,7 @@
                                   fileUploadListener="#{fileUploadController.handleFileUpload}"   
                                   image="/img/bn/browse.png" customUI="true"
                                   multiple="true" label="Selecione..." allowTypes="*.xml;" description="Images"
-                                  update="bayesianNetworkList, nodeList"/> 
+                                  update="tabView"/> 
                     <h:outputLink value="#" title="Upload" onclick="uploader.upload();" 
                                   style="font-weight:bold;color:#616D7E">Enviar Redes Bayesianas
                     </h:outputLink>
@@ -25,8 +25,9 @@
         <h:panelGroup id="messagePanel" layout="block">
             <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
         </h:panelGroup>   
-        <p:panel header="Redes Bayesianas" toggleable="true"                 
-                 collapsed="true">
+        <p:tabView id="tabView">  
+
+        <p:tab id="tab1" title="Redes Bayesianas">
             <h:form>    
                 <br></br>
                 <h:commandLink action="#{bayesianNetworkController.prepareList}" value="Atualizar tabela"/>
@@ -65,9 +66,9 @@
 
                 </h:panelGroup>
             </h:panelGrid>
-        </p:panel>     
+        </p:tab>     
         
-        <p:panel header="Nodos" toggleable="true" collapsed="true">
+        <p:tab id="tab2" title="Nodos">
             <h:form>
                 <br></br>
                 <h:commandLink action="#{nodeController.prepareList}" value="Atualizar tabela"/>
                     </p:dataTable>  
                 </h:form>   
             </h:panelGroup>
+            <h:form>
+                <br></br>
+                <h:commandLink action="/net/node/Create.xhtml" value="Criar novo nodo"/>
+            </h:form>
 
-        </p:panel>
-        <p:panel header="Perguntas" toggleable="true" collapsed="true">
+        </p:tab>
+        <p:tab id="tab3" title="Perguntas">
             <h:form>
                 <br></br>
                 <h:commandLink action="#{questionController.prepareList}" value="Atualizar tabela"/>
                 <br></br>
                 <h:commandLink action="/net/question/Create.xhtml" value="Criar nova pergunta"/>
             </h:form>
-        </p:panel>
-        <p:panel header="Respostas" toggleable="true" collapsed="true">
+        </p:tab>
+        <p:tab id="tab4" title="Respostas">
             <h:form>
                 <br></br>
                 <h:commandLink action="#{answerController.prepareList}" value="Atualizar tabela"/>
                 <br></br>
                 <h:commandLink action="/net/answer/Create.xhtml" value="Criar nova resposta"/>
             </h:form>
-        </p:panel>
+        </p:tab>
+        </p:tabView>
     </h:body>