15

Suppose I want display table:

+--------------------------------+ | | | | ---------------------------------- | | | ---------------------------------- | | | ---------------------------------- | | | | ---------------------------------- | | | | +--------------------------------+ 

How can I do that with h:panelGrid?

2 Answers 2

11

You can't do this with the standard JSF implementation. In JSF 1.2 one would have used Tomahawk's <t:panelGroup colspan="2"> for this. Right now Tomahawk is not officially compatible with JSF 2.0, but I just gave it a try.

<html xmlns:t="http://myfaces.apache.org/tomahawk"> ... <t:panelGrid columns="3"> <t:panelGroup>row1cell1</t:panelGroup> <t:panelGroup>row1cell2</t:panelGroup> <t:panelGroup>row1cell3</t:panelGroup> <t:panelGroup colspan="2">row2cell1-2</t:panelGroup> <t:panelGroup>row2cell3</t:panelGroup> <t:panelGroup>row3cell1</t:panelGroup> <t:panelGroup colspan="2">row3cell2-3</t:panelGroup> <t:panelGroup>row4cell1</t:panelGroup> <t:panelGroup>row4cell2</t:panelGroup> <t:panelGroup>row4cell3</t:panelGroup> </t:panelGrid> 

And it works. I don't guarantee that other Tomahawk components will work as well.

Sign up to request clarification or add additional context in comments.

Comments

2

I don't think core JSF supports this, but some 3rd-party implementations might. Someone posted a solution to this using Tomahawk at the end of the post at the following URL:

http://www.coderanch.com/t/211242/JSF/java/colspan

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.