PrimeFacesGrid Panel

Is there an alternative for panelGrid in PrimeFaces components? Do I need something more sturdy for form design? Something that supports the colspan attribute somehow!

+4
source share
4 answers

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

RichFaces also has components that support colspan , but this does not always work flawlessly with PrimeFaces.

+4
source

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

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 a complete example, please see the show face example.

+4
source

Unfortunately, there are no alternatives for <h:panelGrid> yet.

But hopefully you can use <p:layout> and <p:layoutUnit> for a more creative form.

And there are no restrictions using <table> and <div> with a little CSS. Personally, I will stick to the Grid panel, because it is a JSF component, with more JSF-ish attributes.

+1
source

I do not know why my previous answer was deleted by administrators, but PrimeFaces 3.1 will have a panelGrid component. http://www.primefaces.org/showcase-labs/ui/panelGrid.jsf

+1
source

All Articles