Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PrimeFaces panelGrid

Is there any alternative for panelGrid in PrimeFaces components? I need something more fixable to design forms. Something which supports colspan attribute someway!

like image 978
ehsun7b Avatar asked Sep 28 '26 06:09

ehsun7b


2 Answers

If all you want is colspan, then just use plain vanilla HTML or use Tomahawk's <t:panelGrid> with <t:panelGroup> which supports the colspan attribute.

RichFaces has also components supporting colspan, but that doesn't always work flawlessly together with PrimeFaces.

like image 123
BalusC Avatar answered Oct 01 '26 23:10

BalusC


You can achieve this by using "p:row and p:column" in panel Grid

example:

<p:panelGrid style="margin-top:20px">
<f:facet name="header">
    <p:row>
        <p:column colspan="7">1995-96 NBA Playoffs</p:column>
    </p:row>
    <p:row>
        <p:column colspan="2">Conf. Semifinals</p:column>
        <p:column colspan="2">Conf. Finals</p:column>
        <p:column colspan="2">NBA Finals</p:column>
        <p:column>Champion</p:column>
    </p:row>

</f:facet>

<p:row>
    <p:column style="font-weight: bold;">Seattle</p:column>
    <p:column style="font-weight: bold;">4</p:column>

    <p:column rowspan="2" style="font-weight: bold;">Seattle</p:column>
    <p:column rowspan="2" style="font-weight: bold;">4</p:column>

    <p:column rowspan="5">Seattle</p:column>
    <p:column rowspan="5">2</p:column>

    <p:column rowspan="11" style="font-weight: bold;">Chicago</p:column>
</p:row>
</p:panelGrid>

For Complete Example please visit prime faces show case

like image 43
Az.MaYo Avatar answered Oct 01 '26 22:10

Az.MaYo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!