2 Replies Latest reply on Jul 12, 2007 4:49 AM by Yevgen Tester

    Re-rendering of rich:column and/or rich:columnGroup

    Yannick Lazzari Newbie

      Hi,

      Is it normal that the re-rendering of rich:column and/or rich:columnGroup is not working? Here's an example of what I'm trying to achieve (this is an example to illustrate the concept and not a cut & paste of what I'm actually running):

      <rich:dataTable value="#{rows}" var="row">
       <rich:column id="col1" styleClass="#{row.someFlag ? 'style1' : 'style2'}">
       <f:facet name="header">Column 1</facet>
       <h:outputText value="#{row.someAttribute}"/>
       </rich:column>
       <rich:column id="col2" styleClass="#{row.someFlag ? 'style1' : 'style2'}">
       <f:facet name="header">Column 2</facet>
       <h:outputText value="#{row.someOtherAttribute}"/>
       </rich:column>
       <rich:column id="col3" styleClass="#{row.someFlag ? 'style1' : 'style2'}">
       <f:facet name="header">Column 3</facet>
       <a4j:commandLink value="Some Link" action="#{row.someAction}" reRender="col1, col2, col3"/>
       </rich:column>
      </rich:dataTable>
      


      Basically, when I click on the link in the 3rd column, it toggles the value of "row.someFlag" and I would like to re-render all the cells of that row so that the expression in the "styleClass" is re-evaluated. This should make the "style" attribute in each of the generated td element switch between "style1" or "style2". Unfortunately this doesn't work and the styles stay the same. I also tried grouping my columns together in a rich:columnGroup, applying the style expression to the columnGroup instead and re-rendering the id of the columnGroup element but it still doesn't work. I tried with the latest nightly build of RichFaces (3.0.1-20070529.001425-68) but to no avail.

      Am I doing something wrong or is this not supported? Re-rendering JSF components within a column works great but I'd like to apply my style to the td elements (or tr would be even better) and not have to apply this style to every single element within each of the columns. If anyone has a better way of achieving this, it would be very appreciated.