2 Replies Latest reply on Feb 17, 2010 12:08 AM by Enrique Abancens

    Rerender

    Enrique Abancens Newbie

      Hi


      I´m new in JBOSS Seam.


      I have a tree with many nodes, each node has actionListner with rerender attribute. When the user clik in one node, the result is sucessfull, but in trace file I can see that the query generated by the tree is executed again when it doesn´t render.


      thanks for all.


        • 1. Re: Rerender
          Damian Harvey Apprentice

          What are you rerendering? Show your page code.

          • 2. Re: Rerender
            Enrique Abancens Newbie

            Hi


            My template:





            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <f:view xmlns="http://www.w3.org/1999/xhtml"
               xmlns:ui="http://java.sun.com/jsf/facelets"
               xmlns:f="http://java.sun.com/jsf/core"
               xmlns:h="http://java.sun.com/jsf/html"
               xmlns:a="http://richfaces.org/a4j"
               xmlns:s="http://jboss.com/products/seam/taglib"
               contentType="text/html">
            <html>
               <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
                  <title>ViewModelAdministrationTools</title>
                  <link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/>
                  <a:loadStyle src="/stylesheet/AdministrationTools.css"/>
                  <ui:insert name="head"/>
               </head>
               <body>
                      <div id="menu">
                    <ui:include src="menu.xhtml"/>
                  </div>
                  <div id="container">
                  
                    <div id="sidebar">
                             <ui:insert name="sidebar"/>
                    </div>
                    <s:div id="body">
                            
                             <s:div id="bread">
                             
                                    <h:form>
                                                    <s:link action="activities" value="#{messages.menu_Actividades}" />
                                    </h:form>
                             </s:div>
                             
                             <h:messages id="messages" globalOnly="true" styleClass="message"
                                errorClass="errormsg" infoClass="infomsg" warnClass="warnmsg"
                                rendered="#{showGlobalMessages != 'false'}"/>
                                
                             <div id="details">
                                    <ui:insert name="details"/>
                             </div>
                    </s:div>
                  
                  
                  </div>
                  
             
               </body>
            </html>
            </f:view>








            My Page (Activities.xhtml):




            <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:a="http://richfaces.org/a4j"
                template="layout/template.xhtml">
            
                <ui:define name="details">
                    <rich:panel id="detailsData">
                            <s:div id="deatilsDataIntroActivities" rendered="#{ActivitiesServices.paintActivityIntro}">
                                    <h1><h:outputText value="#{messages.actividades_titulo}"/></h1>
                                    <p><h:outputText value="#{messages.actividades_presentacion}"/></p>
                            </s:div>
                            <s:div id="detailsDataActivities" rendered="#{ActivitiesServices.paintActivityDetail}">
                                    <ui:include src="./layout/activitieDetail.xhtml" />
                            </s:div>
                            
                            
                    </rich:panel>
                    </ui:define>
                    
                    <ui:define name="sidebar">
                            <h:form>
                                    <rich:tree value="#{ActivitiesServices.tree}" var="activitie"  >  
                                            <rich:treeNode >
                                                    <h:outputText value="#{activitie.idLogic}" />
                                                    <h:outputText value=" " />
                                                    <a:outputPanel>
                                                            <h:outputText value="#{activitie.name}"/>
                                                            <a:support reRender="body" event="onclick" actionListener="#{ActivitiesServices.displayActivitieDetail(activitie)}">
                                                                    <s:conversationPropagation type="end"/>
                                                            </a:support>
                                                            
                                                    </a:outputPanel> 
                                                    <h:commandButton action="activitie" alt="#{messages.actividades_borrar}" image="./img/action_delete.gif"/>
                                            
                                            </rich:treeNode>
                                    </rich:tree>
                            </h:form>
                            
                    </ui:define>
                    
            </ui:composition>






            In my tree, i have this code 


            (reRender="body")



            , the tree isn´t in body area.





            <a:support reRender="body" event="onclick" actionListener="#{ActivitiesServices.displayActivitieDetail(activitie)}">
                                                                    <s:conversationPropagation type="end"/>
            </a:support>