1

私はこのようなデータテーブルを持っています:

  <p:dataTable value="#{noteMB.noteList}" var="noteItem" id="noteListTable" 
        rowKey="#{noteItem.hashCode()}" selectionMode="single"  selection="#noteMB.selectedNote}" paginator="true" rows="10" paginatorPosition="top"
        paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15">

    <p:column width="300">
       <f:facet name="header">
            <h:outputText value="#{noteItem.name == 'blabla' ? 'true' : 'false' }"  />
       </f:facet> 
            <h:outputText value="#{noteItem.code}"  />
    </p:column>
  </p:dataTable>

私の質問: ファセット name="header" area で noteItem が null になるのはなぜですか? このコードを実行すると、ヘッダー (noteItem.name) が false で、列の値 (noteItem.code) に値があります。

4

1 に答える 1