0

My question is the following: how can I insert a DataTable with static rows and static columns? These columns and rows will always have the same value.

I have the following table with all the rows and columns with static data but this does not work for me:

<div class="card">
  <p:dataTable lazy="false">

    <p:column headerText="Color">
        <h:outputText value="Red" />
        <h:outputText value="Yellow" />
        <h:outputText value="Green" />
        <h:outputText value="Orange" />
    </p:column>
        
    <p:column headerText="Test">
        <h:outputText value="Test11111" />
        <h:outputText value="Test22222" />
        <h:outputText value="Test33333" />
        <h:outputText value="Test44444" />
    </p:column>
        
</p:dataTable>
</div>

Thanks.

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
danimunoz
  • 1
  • 2

1 Answers1

0

Just use a panelGrid.

<p:panelGrid columns="4">
            <h:outputText value="Red" />
            <h:outputText value="Yellow" />
            <h:outputText value="Green" />
            <h:outputText value="Orange" />
            <h:outputText value="Test11111" />
            <h:outputText value="Test22222" />
            <h:outputText value="Test33333" />
            <h:outputText value="Test44444" />
</p:panelGrid>
Ralf
  • 43
  • 9