I want to make two different renders for the columns headers of the
dataTable. say one will be commandButton and one will be outputtext
somthing like that:

<h:outputText value="#{columnHeader.label}" 
              rendered="#{newEducationDataList.valueModifiable}" 
       style="background-color: #FFDD00;text-align: center;width:100%"/>

<h:commandButton value="#{applicationScope.exampleBean.newdata}" 
                 image="/ITWorx-HR/images/add.png" 
                 rendered="#{!newEducationDataList.valueModifiable}" 
                action="#{applicationScope.exampleBean.setNewEducation}"
alt="New"/>

when I made this two different renders inside the facet it didn't
display anything and when i made two facet it didn't work.

Please can any Body help me.

this is my dataTable Code

<t:dataTable id="data"
             styleClass="scrollerTableNoWidth"
             headerClass="standardTable_Header"
             footerClass="standardTable_Header"
             rowClasses="standardTable_Row1,standardTable_Row2"
columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
             rowOnMouseOver="this.style.backgroundColor='#A5CBFF'"
             rowOnMouseOut="this.style.backgroundColor='#FFFFE0'"
             rowOnClick="this.style.backgroundColor='#FFE0E0'"
             rowOnDblClick="this.style.backgroundColor='#E0E0E0'"
             var="row"           
             value="#{newEducationDataList.data}"
             reserveDataModel="false"
             rows="10"
             sortColumn="#{newEducationDataList.sort}"
             sortAscending="#{newEducationDataList.ascending}"
             preserveSort="true">
<t:columns id="columns"
value="#{newEducationDataList.columnHeaders}"    
var="columnHeader"
style="width:100px">                                        

    <f:facet name="header">                                            
       <h:outputText value="#{columnHeader.label}"/> 
    </f:facet>
                                    
    <!-- row is also available -->
    "/>
               
<h:commandButton image="/ITWorx-HR/images/add.png" 
                 rendered="#{!newEducationDataList.valueModifiable}"  
                 value="#{newEducationDataList.columnValue}" 
                 action="#{newEducationDataList.setNewEducation}"
alt="remove"/>

<h:inputText rendered="#{newEducationDataList.valueModifiable}"
value="#{newEducationDataList.columnValue}" />
                                    </t:columns>           
                                </t:dataTable>

Reply via email to