How can I get the nested components of a

in a facelet using EL

前端 未结 1 397
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-28 03:45

Let\'s say I have this:



        
相关标签:
1条回答
  • 2021-01-28 03:58

    You can render any element inside the <p:columns> element.

    What you want to do is probably render the cell contents differently, depending on the column. You can try something like this :

      //classic rendering (for all cells)
      <h:outputText value="#{car[column.property]}"/>
    
      //conditional rendering (for 'report' cells only)
      <h:panelGroup rendered="#{column.property == 'report'}">
        <p:commandLink id="MRepShowButton" update=":form1:display" onclick="EditorDialog.show();"  title="Editer le compte rendu">
          <f:setPropertyActionListener value="#{exam}" target="#{dyna.selectedExamen}" />  
          <p:graphicImage id="img1" value="/images/study_Report_icons/Text/0.png" rendered="#{exam.examen.rapport.rapportWrittenState == null}"/>
          <p:graphicImage id="img2" value="/images/study_Report_icons/Text/#{exam.examen.rapport.rapportWrittenState}.png" rendered="#{exam.examen.rapport.rapportWrittenState != null}"/>
        </p:commandLink>
      </h:panelGroup>
    
    0 讨论(0)
提交回复
热议问题