5 Replies Latest reply on Sep 6, 2007 8:53 AM by Aleksej Yanul

    rich:dataTable rendered attribute bug?

    Bruno Arruda Newbie

      Hi,

      I´m using richfaces 3.1.0 snapshot and 3.0.2...

      When I set the attribute rendered manually it works, when I try to get from a MB the method is not called... I´m using the same method on other components and they work correctly

      worked:
      rendered="false"

      did not work:
      rendered="#{crudQuestion.teste}"

      Thanks in advance

        • 1. Re: rich:dataTable rendered attribute bug?
          Bruno Arruda Newbie

          Here comes the entire code, i believe this is a richfacesBug, because all the rendered works except for the dataTable....

           <rich:dataTable
           id="editQuestionRichDataTable1"
           onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
           onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
           cellpadding="0" cellspacing="0"
           width="700" border="0" var="optionLocalList" value="#{crudQuestion.optionList}" rendered="#{crudQuestion.optionsTable}">
          
           <f:facet name="header">
           <rich:columnGroup id="editQuestionRichColumnGroup1">
           <rich:column id="editQuestionColumn1" colspan="2">
           <h:outputText value="#{msg.editQuestionOutputText3}" id="editQuestionOutputText3" />
           </rich:column>
           <rich:column id="editQuestionColumn4">
           <h:outputText value="#{msg.editQuestionOutputText6}" id="editQuestionOutputText6" />
           </rich:column>
           </rich:columnGroup>
           </f:facet>
          
           <rich:column id="editQuestionColumn2">
           <h:commandLink action="editOption" actionListener="#{crudOption.loadUpdateOptionPage}" value="#{optionLocalList.description}" tabindex="4" >
           <f:param id="updateOptionID" name="id" value="#{optionLocalList.optionID}" />
           <a4j:support event="onclick"/>
           </h:commandLink>
           </rich:column>
           <rich:column id="editQuestionColumn3">
           <h:commandLink action="disableQuestion" actionListener="#{crudOption.loadDisableOptionPage}" value="#{msg.editOptionCommandLink1}" tabindex="5" >
           <f:param id="deleteID" name="deleteId" value="#{optionLocalList.optionID}" />
           </h:commandLink>
           </rich:column>
           <rich:column id="editQuestionColumn5" >
           <h:outputText id="editQuestionOutputText5" value="#{optionLocalList.order}"></h:outputText>
           </rich:column>
          
           </rich:dataTable>
          
          


          • 3. Re: rich:dataTable rendered attribute bug?
            Bruno Arruda Newbie

            you are welcome, for those with this problem here comes a workaround:

            embrace the dataTable with this JSTL tag:

            <c:if test="${crudQuestion.optionsTable}">

            PS.:

            You must be using JSF 1.2 and JSTL 1.2

            Best Regards

            • 4. Re: rich:dataTable rendered attribute bug?
              Nick Belaevski Master

              Hello!

              I cannot reproduce the issue. Both expressions: rendered="#{false}" and rendered="#{bean.rendered}" work for me as desired. Could you please provide some more info:
              - bean code
              - faces-config.xml
              - environment description, eg. JSF, Facelets version
              ? Thank you in advance!

              • 5. Re: rich:dataTable rendered attribute bug?
                Aleksej Yanul Newbie

                Hi,
                this not bug.
                work

                <rich:dataTable id="dataTableID" value="#{dataTable.value}" rendered="#{dataTable.rendered}" var="dt" >
                 ...
                </rich:dataTable>
                <h:selectBooleanCheckbox value="#{dataTable.rendered}" action="submit();"/>
                

                or
                <rich:panel id="panelID">
                 <rich:dataTable id="dataTableID" value="#{dataTable.value}" rendered="#{dataTable.rendered}" var="dt" >
                 ...
                 </rich:dataTable>
                </rich:panel>
                <h:selectBooleanCheckbox value="#{dataTable.rendered}">
                 <a4j:support event="onchange" reRender="panelID"></a4j:support>
                </h:selectBooleanCheckbox>