Changed ui controllers to let primefaces handle the pagination.
authorMichele Silva <michele.silva@gmail.com>
Tue, 24 Jan 2012 18:54:36 +0000 (16:54 -0200)
committerMichele Silva <michele.silva@gmail.com>
Tue, 24 Jan 2012 18:54:36 +0000 (16:54 -0200)
src/java/org/ufcspa/simdecs/bn/ui/AnswerController.java
src/java/org/ufcspa/simdecs/bn/ui/BayesianNetworkController.java
src/java/org/ufcspa/simdecs/bn/ui/NodeController.java
src/java/org/ufcspa/simdecs/bn/ui/QuestionController.java
web/bn.xhtml
web/bn/answer/Create.xhtml
web/bn/node/Create.xhtml
web/bn/question/Create.xhtml
web/img/bn/remove.png

index ccd3712..3045d8c 100644 (file)
@@ -162,14 +162,21 @@ public class AnswerController implements Serializable {
         }
     }
 
-    public DataModel getItems() {
+    public DataModel getPaginatedItems() {
         if (items == null) {
             items = getPagination().createPageDataModel();
         }
         return items;
     }
+    
+    public DataModel getItems() {
+        if (items == null) {
+            items = new ListDataModel(getJpaController().findAnswerEntities());
+        }
+        return items;
+    }
 
-    private void recreateModel() {
+    public void recreateModel() {
         items = null;
     }
 
index 9dbe96f..019a90f 100644 (file)
@@ -162,14 +162,21 @@ public class BayesianNetworkController implements Serializable {
         }
     }
 
-    public DataModel getItems() {
+    public DataModel getPaginatedItems() {
         if (items == null) {
             items = getPagination().createPageDataModel();
         }
         return items;
     }
+    
+    public DataModel getItems() {
+        if (items == null) {
+            items = new ListDataModel(getJpaController().findBayesianNetworkEntities());
+        }
+        return items;
+    }
 
-    private void recreateModel() {
+    public void recreateModel() {
         items = null;
     }
 
index 11604a3..f8f82d3 100644 (file)
@@ -168,14 +168,21 @@ public class NodeController implements Serializable {
         }
     }
 
-    public DataModel getItems() {
+    public DataModel getPaginatedItems() {
         if (items == null) {
             items = getPagination().createPageDataModel();
         }
         return items;
     }
+    
+   public DataModel getItems() {
+        if (items == null) {
+            items = new ListDataModel(getJpaController().findNodeEntities());
+        }
+        return items;
+    }
 
-    private void recreateModel() {
+    public void recreateModel() {
         items = null;
     }
 
index 711712f..8c53542 100644 (file)
@@ -162,14 +162,21 @@ public class QuestionController implements Serializable {
         }
     }
 
-    public DataModel getItems() {
+    public DataModel getPaginatedItems() {
         if (items == null) {
             items = getPagination().createPageDataModel();
         }
         return items;
     }
 
-    private void recreateModel() {
+    public DataModel getItems() {
+        if (items == null) {
+            items = new ListDataModel(getJpaController().findQuestionEntities());
+        }
+        return items;
+    }
+       
+    public void recreateModel() {
         items = null;
     }
 
index 91d29ea..e4df77e 100644 (file)
         <h:outputStylesheet name="css/jsfcrud.css"/>
     </h:head>
     <h:body>
-        <h:outputLabel> <h1>SimDeCS - Cadastro de Redes Bayesianas</h1> </h:outputLabel>
-            <h:panelGrid>
+        <h:outputLabel> <h1>SimDeCS - Cadastro de Redes Bayesianas</h1> </h:outputLabel>           
+        <h:panelGroup id="messagePanel" layout="block">
+            <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
+        </h:panelGroup>   
+        <p:tabView id="tabView"> 
+            <p:tab id="tab1" title="Redes Bayesianas">
                 <h:form>
                     <p:fileUpload widgetVar="uploader" height="48" width="48"  
-                                  fileUploadListener="#{fileUploadController.handleFileUpload}"   
-                                  image="/img/bn/browse.png" customUI="true"
-                                  multiple="true" label="Selecione..." allowTypes="*.xml;" description="Images"
-                                  update="tabView"/> 
+                                    fileUploadListener="#{fileUploadController.handleFileUpload}"   
+                                    image="/img/bn/browse.png" customUI="true"
+                                    multiple="true" label="Selecione..." allowTypes="*.xml;" description="Images"
+                                    update="tabView"/> 
                     <h:outputLink value="#" title="Upload" onclick="uploader.upload();" 
-                                  style="font-weight:bold;color:#616D7E">Enviar Redes Bayesianas
+                                    style="font-weight:bold;color:#616D7E">Enviar Redes Bayesianas
                     </h:outputLink>
                 </h:form>            
-            </h:panelGrid>    
-        <h:panelGroup id="messagePanel" layout="block">
-            <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
-        </h:panelGroup>   
-        <p:tabView id="tabView">  
+                <h:form>    
+                    <br></br>
+                    <h:commandLink action="#{bayesianNetworkController.recreateModel}" value="Atualizar tabela"/>
+                </h:form>
+                <h:panelGrid columns="2" cellpadding="10">                                        
+                    <h:outputText escape="false" value="#{bundle.ListBayesianNetworkEmpty}" rendered="#{bayesianNetworkController.items.rowCount == 0}"/>
+                    <h:panelGroup rendered="#{bayesianNetworkController.items.rowCount > 0}">   
 
-        <p:tab id="tab1" title="Redes Bayesianas">
-            <h:form>    
-                <br></br>
-                <h:commandLink action="#{bayesianNetworkController.prepareList}" value="Atualizar tabela"/>
-            </h:form>
-            <h:panelGrid columns="2" cellpadding="10">                                        
-                <h:outputText escape="false" value="#{bundle.ListBayesianNetworkEmpty}" rendered="#{bayesianNetworkController.items.rowCount == 0}"/>
-                <h:panelGroup rendered="#{bayesianNetworkController.items.rowCount > 0}">   
+                        <h:form id="fBayesianNetworkList">
+                            <p:dataTable var="bayesianNetwork" value="#{bayesianNetworkController.items}" id="bayesianNetworkList" 
+                                         paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
+                                         rowEditListener="#{bayesianNetworkController.rowEditListener}">  
+                                <p:column headerText="id">  
+                                    <h:outputText value="#{bayesianNetwork.id}"/>  
+                                </p:column>  
 
-                    <h:form id="fBayesianNetworkList">
+                                <p:column headerText="Nome">  
+                                    <p:cellEditor>  
+                                        <f:facet name="output">  
+                                            <h:outputText value="#{bayesianNetwork.name}"/>  
+                                        </f:facet>  
+                                        <f:facet name="input">  
+                                            <p:inputText value="#{bayesianNetwork.name}"/>  
+                                        </f:facet>  
+                                    </p:cellEditor>  
+                                </p:column>   
+                                <p:column headerText="Opções">  
+                                    <p:rowEditor />  
+                                    <h:commandLink action="#{bayesianNetworkController.destroy}" >
+                                        <h:graphicImage value="/img/bn/remove.png" />
+                                    </h:commandLink>
+                                </p:column>  
+                            </p:dataTable>  
+                        </h:form>         
+                    </h:panelGroup>
+                </h:panelGrid>
+            </p:tab>     
 
-                        <p:dataTable var="bayesianNetwork" value="#{bayesianNetworkController.items}" id="bayesianNetworkList" 
+            <p:tab id="tab2" title="Nodos">
+                <h:form>
+                    <br></br>
+                    <h:commandLink action="#{nodeController.recreateModel}" value="Atualizar tabela"/>
+                </h:form>                            
+                <h:outputText escape="false" value="#{bundle.ListNodeEmpty}" rendered="#{nodeController.items.rowCount == 0}"/>
+                <h:panelGroup rendered="#{nodeController.items.rowCount > 0}">  
+                    <h:form>      
+                        <p:dataTable var="node" value="#{nodeController.items}" id="nodeList" 
                                      paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
-                                     rowEditListener="#{bayesianNetworkController.rowEditListener}">  
-                            <p:column headerText="id">  
-                                <h:outputText value="#{bayesianNetwork.id}"/>  
+                                     rowEditListener="#{nodeController.rowEditListener}">  
+
+                            <p:column headerText="id">                                 
+                                <h:outputText value="#{node.id}" />                                
                             </p:column>  
 
                             <p:column headerText="Nome">  
                                 <p:cellEditor>  
                                     <f:facet name="output">  
-                                        <h:outputText value="#{bayesianNetwork.name}"/>  
+                                        <h:outputText value="#{node.name}" />  
                                     </f:facet>  
                                     <f:facet name="input">  
-                                        <p:inputText value="#{bayesianNetwork.name}"/>  
+                                        <p:inputText value="#{node.name}" style="width:100%"/>  
                                     </f:facet>  
                                 </p:cellEditor>  
-                            </p:column>   
+                            </p:column>  
+                            <p:column headerText="Tempo">  
+                                <p:cellEditor>  
+                                    <f:facet name="output">  
+                                        <h:outputText value="#{node.time}" />  
+                                    </f:facet>  
+                                    <f:facet name="input">  
+                                        <p:inputText value="#{node.time}" style="width:100%"/>  
+                                    </f:facet>  
+                                </p:cellEditor>  
+                            </p:column>  
+                            <p:column headerText="Custo">  
+                                <p:cellEditor>  
+                                    <f:facet name="output">  
+                                        <h:outputText value="#{node.cost}" />  
+                                    </f:facet>  
+                                    <f:facet name="input">  
+                                        <p:inputText value="#{node.cost}" style="width:100%"/>  
+                                    </f:facet>  
+                                </p:cellEditor>  
+                            </p:column>  
+                            <p:column headerText="Classificação">
+                                <p:cellEditor>  
+                                    <f:facet name="output">  
+                                        <h:outputText value="#{node.nodeType}" />  
+                                    </f:facet>  
+                                    <f:facet name="input">  
+                                        <h:selectOneMenu value="#{node.nodeType}" >  
+                                            <f:selectItems value="#{nodeTypeController.nodeTypes}"  
+                                                           var="nodeType"   
+                                                           itemLabel="#{nodeType}"  
+                                                           itemValue="#{nodeType}" />  
+                                        </h:selectOneMenu>  
+                                    </f:facet>  
+                                </p:cellEditor>  
+                            </p:column>  
+                            <p:column headerText="Tipo">
+                                <p:cellEditor>  
+                                    <f:facet name="output">  
+                                        <h:outputText value="#{node.nodeRole}" />  
+                                    </f:facet>  
+                                    <f:facet name="input">  
+                                        <h:selectOneMenu value="#{node.nodeRole}" >  
+                                            <f:selectItems value="#{nodeRoleController.nodeRoles}"  
+                                                           var="nodeType"   
+                                                           itemLabel="#{nodeRole}"  
+                                                           itemValue="#{nodeRole}" />  
+                                        </h:selectOneMenu>  
+                                    </f:facet>  
+                                </p:cellEditor>  
+                            </p:column>  
+                            <p:column headerText="Rede Bayesiana"> 
+                                <h:outputText value="#{node.bayesianNetwork.name}"/>
+                            </p:column>  
+
+
                             <p:column headerText="Opções">  
                                 <p:rowEditor />  
-                                <h:commandLink action="#{bayesianNetworkController.destroy}" >
+                                <h:commandLink action="#{nodeController.destroy}" >
                                     <h:graphicImage value="/img/bn/remove.png" />
                                 </h:commandLink>
                             </p:column>  
                         </p:dataTable>  
-                    </h:form>         
-
+                    </h:form>   
                 </h:panelGroup>
-            </h:panelGrid>
-        </p:tab>     
-        
-        <p:tab id="tab2" title="Nodos">
-            <h:form>
-                <br></br>
-                <h:commandLink action="#{nodeController.prepareList}" value="Atualizar tabela"/>
-            </h:form>                            
-            <h:outputText escape="false" value="#{bundle.ListNodeEmpty}" rendered="#{nodeController.items.rowCount == 0}"/>
-            <h:panelGroup rendered="#{nodeController.items.rowCount > 0}">  
-                <h:form>      
-                    <p:dataTable var="node" value="#{nodeController.items}" id="nodeList" 
-                                 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
-                                 rowEditListener="#{nodeController.rowEditListener}">  
-
-                        <p:column headerText="id">                                 
-                            <h:outputText value="#{node.id}" />                                
-                        </p:column>  
-
-                        <p:column headerText="Nome">  
-                            <p:cellEditor>  
-                                <f:facet name="output">  
-                                    <h:outputText value="#{node.name}" />  
-                                </f:facet>  
-                                <f:facet name="input">  
-                                    <p:inputText value="#{node.name}" style="width:100%"/>  
-                                </f:facet>  
-                            </p:cellEditor>  
-                        </p:column>  
-                        <p:column headerText="Tempo">  
-                            <p:cellEditor>  
-                                <f:facet name="output">  
-                                    <h:outputText value="#{node.time}" />  
-                                </f:facet>  
-                                <f:facet name="input">  
-                                    <p:inputText value="#{node.time}" style="width:100%"/>  
-                                </f:facet>  
-                            </p:cellEditor>  
-                        </p:column>  
-                        <p:column headerText="Custo">  
-                            <p:cellEditor>  
-                                <f:facet name="output">  
-                                    <h:outputText value="#{node.cost}" />  
-                                </f:facet>  
-                                <f:facet name="input">  
-                                    <p:inputText value="#{node.cost}" style="width:100%"/>  
-                                </f:facet>  
-                            </p:cellEditor>  
-                        </p:column>  
-                        <p:column headerText="Classificação">
-                            <p:cellEditor>  
-                                <f:facet name="output">  
-                                    <h:outputText value="#{node.nodeType}" />  
-                                </f:facet>  
-                                <f:facet name="input">  
-                                    <h:selectOneMenu value="#{node.nodeType}" >  
-                                        <f:selectItems value="#{nodeTypeController.nodeTypes}"  
-                                                       var="nodeType"   
-                                                       itemLabel="#{nodeType}"  
-                                                       itemValue="#{nodeType}" />  
-                                    </h:selectOneMenu>  
-                                </f:facet>  
-                            </p:cellEditor>  
-                        </p:column>  
-                        <p:column headerText="Tipo">
-                            <p:cellEditor>  
-                                <f:facet name="output">  
-                                    <h:outputText value="#{node.nodeRole}" />  
-                                </f:facet>  
-                                <f:facet name="input">  
-                                    <h:selectOneMenu value="#{node.nodeRole}" >  
-                                        <f:selectItems value="#{nodeRoleController.nodeRoles}"  
-                                                       var="nodeType"   
-                                                       itemLabel="#{nodeRole}"  
-                                                       itemValue="#{nodeRole}" />  
-                                    </h:selectOneMenu>  
-                                </f:facet>  
-                            </p:cellEditor>  
-                        </p:column>  
-                        <p:column headerText="Rede Bayesiana"> 
-                            <h:outputText value="#{node.bayesianNetwork.name}"/>
-                        </p:column>  
+                <h:form>
+                    <br></br>
+                    <h:commandLink action="/bn/node/Create.xhtml" value="Criar novo nodo"/>
+                </h:form>
+            </p:tab>
+            
+            <p:tab id="tab3" title="Perguntas">
+                <h:form>
+                    <br></br>
+                    <h:commandLink action="#{questionController.recreateModel}" value="Atualizar tabela"/>
+                </h:form>       
+                <h:form>
+                    <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
+                    <h:panelGroup rendered="#{questionController.items.rowCount > 0}">                       
+                        <p:dataTable var="question" value="#{questionController.items}" id="questionList" 
+                                     paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
+                                     rowEditListener="#{questionController.rowEditListener}">  
 
+                            <p:column headerText="id">                                 
+                                <h:outputText value="#{question.id}" />                                
+                            </p:column>  
 
-                        <p:column headerText="Opções">  
-                            <p:rowEditor />  
-                        </p:column>  
+                            <p:column headerText="Texto">  
+                                <p:cellEditor>  
+                                    <f:facet name="output">  
+                                        <h:outputText value="#{question.text}" />  
+                                    </f:facet>  
+                                    <f:facet name="input">  
+                                        <p:inputText value="#{question.text}" style="width:100%"/>  
+                                    </f:facet>  
+                                </p:cellEditor>  
+                            </p:column>                     
+                            <p:column headerText="Nodo"> 
+                                <h:outputText value="#{question.node.name}"/>
+                            </p:column> 
+                            <p:column headerText="Rede Bayesiana"> 
+                                <h:outputText value="#{question.node.bayesianNetwork.name}"/>
+                            </p:column>  
+                            <p:column headerText="Opções">  
+                                <p:rowEditor />  
+                                <h:commandLink action="#{questionController.destroy}" >
+                                    <h:graphicImage value="/img/bn/remove.png" />
+                                </h:commandLink>
+                            </p:column>  
 
-                    </p:dataTable>  
+                        </p:dataTable>                                                 
+                    </h:panelGroup>                    
                 </h:form>   
-            </h:panelGroup>
-            <h:form>
-                <br></br>
-                <h:commandLink action="/bn/node/Create.xhtml" value="Criar novo nodo"/>
-            </h:form>
-
-        </p:tab>
-        <p:tab id="tab3" title="Perguntas">
-            <h:form>
-                <br></br>
-                <h:commandLink action="#{questionController.prepareList}" value="Atualizar tabela"/>
-            </h:form>       
-            <h:form>
-                <h:outputText escape="false" value="#{bundle.ListQuestionEmpty}" rendered="#{questionController.items.rowCount == 0}"/>
-                <h:panelGroup rendered="#{questionController.items.rowCount > 0}">                       
-                    <p:dataTable var="question" value="#{questionController.items}" id="questionList" 
-                                 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
-                                 rowEditListener="#{questionController.rowEditListener}">  
-
-                        <p:column headerText="id">                                 
-                            <h:outputText value="#{question.id}" />                                
-                        </p:column>  
-
-                        <p:column headerText="Texto">  
-                            <p:cellEditor>  
-                                <f:facet name="output">  
-                                    <h:outputText value="#{question.text}" />  
-                                </f:facet>  
-                                <f:facet name="input">  
-                                    <p:inputText value="#{question.text}" style="width:100%"/>  
-                                </f:facet>  
-                            </p:cellEditor>  
-                        </p:column>                     
-                        <p:column headerText="Nodo"> 
-                            <h:outputText value="#{question.node.name}"/>
-                        </p:column> 
-                        <p:column headerText="Rede Bayesiana"> 
-                            <h:outputText value="#{question.node.bayesianNetwork.name}"/>
-                        </p:column>  
-
-
-                        <p:column headerText="Opções">  
-                            <p:rowEditor />  
-                            <h:commandLink action="#{bayesianNetworkController.destroy}" >
-                                <h:graphicImage value="/img/bn/remove.png" />
-                            </h:commandLink>
-                        </p:column>  
-
-                    </p:dataTable>                                                 
-                </h:panelGroup>                    
-            </h:form>   
-
-            <h:form>
-                <br></br>
-                <h:commandLink action="/bn/question/Create.xhtml" value="Criar nova pergunta"/>
-            </h:form>
-        </p:tab>
-        <p:tab id="tab4" title="Respostas">
-            <h:form>
-                <br></br>
-                <h:commandLink action="#{answerController.prepareList}" value="Atualizar tabela"/>
-            </h:form>       
-            <h:form>
-                <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/>
-                <h:panelGroup rendered="#{answerController.items.rowCount > 0}">                       
-                    <p:dataTable var="answer" value="#{answerController.items}" id="answerList" 
-                                 paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
-                                 rowEditListener="#{answerController.rowEditListener}">  
-
-                        <p:column headerText="id">                                 
-                            <h:outputText value="#{answer.id}" />                                
-                        </p:column>  
-
-                        <p:column headerText="Texto">  
-                            <p:cellEditor>  
-                                <f:facet name="output">  
-                                    <h:outputText value="#{answer.text}" />  
-                                </f:facet>  
-                                <f:facet name="input">  
-                                    <p:inputText value="#{answer.text}" style="width:100%"/>  
-                                </f:facet>  
-                            </p:cellEditor>  
-                        </p:column>      
-                        <p:column headerText="Probabilidade">  
-                            <p:cellEditor>  
-                                <f:facet name="output">  
-                                    <h:outputText value="#{answer.likelihood}" />  
-                                </f:facet>  
-                                <f:facet name="input">  
-                                    <p:inputText value="#{answer.likelihood}" style="width:100%"/>  
-                                </f:facet>  
-                            </p:cellEditor>  
-                        </p:column>   
-                        <p:column headerText="Pergunta"> 
-                            <h:outputText value="#{answer.question.text}"/>
-                        </p:column>
-                        <p:column headerText="Nodo"> 
-                            <h:outputText value="#{answer.question.node.name}"/>
-                        </p:column> 
-                        <p:column headerText="Rede Bayesiana"> 
-                            <h:outputText value="#{answer.question.node.bayesianNetwork.name}"/>
-                        </p:column>  
+                <h:form>
+                    <br></br>
+                    <h:commandLink action="/bn/question/Create.xhtml" value="Criar nova pergunta"/>
+                </h:form>
+            </p:tab>
+            
+            <p:tab id="tab4" title="Respostas">
+                <h:form>
+                    <br></br>
+                    <h:commandLink action="#{answerController.recreateModel}" value="Atualizar tabela"/>
+                </h:form>       
+                <h:form>
+                    <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/>
+                    <h:panelGroup rendered="#{answerController.items.rowCount > 0}">                       
+                        <p:dataTable var="answer" value="#{answerController.items}" id="answerList" 
+                                     paginator="true" rows="10" style="width:100%" paginatorPosition="bottom"
+                                     rowEditListener="#{answerController.rowEditListener}">  
 
+                            <p:column headerText="id">                                 
+                                <h:outputText value="#{answer.id}" />                                
+                            </p:column>  
 
-                        <p:column headerText="Opções">  
-                            <p:rowEditor />  
-                        </p:column>  
-                    </p:dataTable>  
-                </h:panelGroup>   
-            </h:form>   
-            <h:form>
-                <br></br>
-                <h:commandLink action="/bn/answer/Create.xhtml" value="Criar nova resposta"/>
-            </h:form>
-        </p:tab>
+                            <p:column headerText="Texto">  
+                                <p:cellEditor>  
+                                    <f:facet name="output">  
+                                        <h:outputText value="#{answer.text}" />  
+                                    </f:facet>  
+                                    <f:facet name="input">  
+                                        <p:inputText value="#{answer.text}" style="width:100%"/>  
+                                    </f:facet>  
+                                </p:cellEditor>  
+                            </p:column>      
+                            <p:column headerText="Probabilidade">  
+                                <p:cellEditor>  
+                                    <f:facet name="output">  
+                                        <h:outputText value="#{answer.likelihood}" />  
+                                    </f:facet>  
+                                    <f:facet name="input">  
+                                        <p:inputText value="#{answer.likelihood}" style="width:100%"/>  
+                                    </f:facet>  
+                                </p:cellEditor>  
+                            </p:column>   
+                            <p:column headerText="Pergunta"> 
+                                <h:outputText value="#{answer.question.text}"/>
+                            </p:column>
+                            <p:column headerText="Nodo"> 
+                                <h:outputText value="#{answer.question.node.name}"/>
+                            </p:column> 
+                            <p:column headerText="Rede Bayesiana"> 
+                                <h:outputText value="#{answer.question.node.bayesianNetwork.name}"/>
+                            </p:column> 
+                            <p:column headerText="Opções">  
+                                <p:rowEditor /> 
+                                <h:commandLink action="#{answerController.destroy}" >
+                                    <h:graphicImage value="/img/bn/remove.png" />
+                                </h:commandLink>
+                            </p:column>  
+                        </p:dataTable>  
+                    </h:panelGroup>   
+                </h:form>   
+                <h:form>
+                    <br></br>
+                    <h:commandLink action="/bn/answer/Create.xhtml" value="Criar nova resposta"/>
+                </h:form>
+            </p:tab>
         </p:tabView>
     </h:body>
 
index 90e700c..9f24209 100644 (file)
                     </h:selectOneMenu>
                 </h:panelGrid>
                 <br />
-                <h:commandLink action="#{answerController.create}" value="#{bundle.CreateAnswerSaveLink}" />
+                <h:commandLink action="#{answerController.create}" value="#{bundle.CreateAnswerSaveLink}" />             
                 <br />
                 <br />
-                <h:commandLink action="#{answerController.prepareList}" value="#{bundle.CreateAnswerShowAllLink}" immediate="true"/>
-                <br />
-                <br />
-                <h:commandLink value="#{bundle.CreateAnswerIndexLink}" action="/index" immediate="true" />
+                <h:commandLink value="#{bundle.CreateAnswerIndexLink}" action="/bn" immediate="true" />
             </h:form>
         </ui:define>
     </ui:composition>
index 9c8ad32..69cd073 100644 (file)
                     </h:selectOneMenu>
                 </h:panelGrid>
                 <br />
-                <h:commandLink action="#{nodeController.create}" value="#{bundle.CreateNodeSaveLink}" />
+                <h:commandLink action="#{nodeController.create}" value="#{bundle.CreateNodeSaveLink}" />               
                 <br />
                 <br />
-                <h:commandLink action="#{nodeController.prepareList}" value="#{bundle.CreateNodeShowAllLink}" immediate="true"/>
-                <br />
-                <br />
-                <h:commandLink value="#{bundle.CreateNodeIndexLink}" action="/index" immediate="true" />
+                <h:commandLink value="#{bundle.CreateNodeIndexLink}" action="/bn" immediate="true" />
             </h:form>
         </ui:define>
     </ui:composition>
index cdcbc6e..c81855c 100644 (file)
                     </h:selectOneMenu>
                 </h:panelGrid>
                 <br />
-                <h:commandLink action="#{questionController.create}" value="#{bundle.CreateQuestionSaveLink}" />
+                <h:commandLink action="#{questionController.create}" value="#{bundle.CreateQuestionSaveLink}" />             
                 <br />
                 <br />
-                <h:commandLink action="#{questionController.prepareList}" value="#{bundle.CreateQuestionShowAllLink}" immediate="true"/>
-                <br />
-                <br />
-                <h:commandLink value="#{bundle.CreateQuestionIndexLink}" action="/index" immediate="true" />
+                <h:commandLink value="#{bundle.CreateQuestionIndexLink}" action="/bn" immediate="true" />
             </h:form>
         </ui:define>
     </ui:composition>
index 03e3170..b18352b 100644 (file)
Binary files a/web/img/bn/remove.png and b/web/img/bn/remove.png differ