7 Replies Latest reply on Sep 18, 2007 5:46 PM by Yurii Kartsev

    Global adressing to an id(like :id) with reRender

    Yurii Kartsev Apprentice

      Good afternoon.

      I can't figure out where is the problem... Global adressing isn't working, but local is.

      I have:

      <rich:tabPanel switchType="client" style="background-color:#B5CEFD;width:100%">
      
      ...
      
       <rich:tab id="anketaTabPanel" label="Starea civila si rudele" style="background-color: #B5CEFD;width:100%" id="relatives_tab">
       <h:form>
      
      ...
      
       <a4j:commandButton action="#{amBean.action4Relative}" value="Adauga rudele" focus="relatives_tab" reRender = ":relativesTable">
       </a4j:commandButton>
       </h:form>
       </rich:tab>
      
       <br/>
      
       <h:form>
       <rich:dataTable
       id="relativesTable"
       onRowClick="this.style.backgroundColor='#F1F1F1'"
       onRowMouseOver="this.style.backgroundColor='#B5CEFD'"
       onRowMouseOut="this.style.backgroundColor='#{org.richfaces.SKIN.tableBackgroundColor}'"
       cellpadding="0" cellspacing="0" style="width:100%"
       value="#{amBean.employee.relativeList}" var="rudele">
      
      ...



      I have 2 questions:

      1. You see that in a4j:commandButton reRender is ":relativesTable". And after I press this button - the dataTable is not refreshed. But the logs in server.log exist. When I use "relativesTable" - it is refreshed. Why? I use ':' because this table is in other form.

      2. Why does this button(I mean the button in THIS form), refreshes(reRenders) elements in the other forms, which are situated in other tabs? I've found it out by checking JBoss logs, there are a lot of strings like:
      2007-09-18 20:31:02,303 DEBUG [org.ajax4jsf.renderkit.AjaxChildrenRenderer] AjaxView encodeChild
      component for AJAX request with at path :j_id262: ID salaryStartEdit

      and I know for 100% that "salaryStartEdit" is in the other tab and it's: <h:inputText id="salaryStartEdit" value="#{amBean.job.salaryStart}" />


      Thank you very much for your answers. I like RichFaces very much and really want to know more about its behavior. Thanks.