8 Replies Latest reply on Jun 4, 2008 10:56 AM by Aleksej Yanul

    Rerendering the whole datatable

    Tomislav Tkal?evi? Novice

      If in richfaces datatable in one column is a a:commandButton,
      which reRenders the parent datatable,
      then applied css are not applied
      and javascripts,
      which are on that page.
      So they cant't work (only in IE6 & iE7, in firefox it works).

      Here is the code:

      <r:dataTable id="table"
      onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
      onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
      cellpadding="0" cellspacing="0" var="v" rowKeyVar="rb"
      value="#{bean.list}"
      rendered="#{entity.id != 0}">
      
      <f:facet name="header">
       <r:columnGroup>
       <r:column>
       <r:spacer />
       </r:column>
       </r:columnGroup>
      </f:facet>
      
      <r:column>
      <t:inputText id="in" value="" size="1"
      onkeypress="return clickTheButtonIfEnterIsPressed(event,#{rb})"/>
      
      <a:commandButton id="butt"
      value="butt" action="#{bean.action}"/>
      </r:column>
      </r:dataTable>
      


      So if datatable is rerendered then it loses javascripts and css's....