All pastes #29938 Raw Edit

Anonymous

public text v1 · immutable
#29938 ·published 2005-11-21 11:05 UTC
rendered paste body
Trying to create a form with fields laid out like this:

---- ---- ---- ----
---- ---- ---- ----
---- ---- ---- ----
--------- ---------
--------- ---------

i.e. x rows with 4 columns, then just 2 columns for the last two entries.

My current approach is something like this:

<h:panelGrid columns="4">

  <h:outputText value="one" />
  <h:outputText value="two" />
  <h:outputText value="three" />
  <h:outputText value="four" />

  <h:outputText value="one" />
  <h:outputText value="two" />
  <h:outputText value="three" />
  <h:outputText value="four" />

  <h:outputText value="one" />
  <h:outputText value="two" />
  <h:outputText value="three" />
  <h:outputText value="four" />

  <h:outputText value="one" />
  <h:outputText value="two" />
  <h:outputText value="three" />
  <h:outputText value="four" />
 
  <h:panelGroup>
    <h:panelGrid columns="2">

      <h:outputText value="first " />
      <h:outputText value="long line" />

      <h:outputText value="second long" />
      <h:outputText value=" line" />

    </h:panelGrid>
  </h:panelGroup>

</h:panelGrid>

but that doesn't work too well, as it distorts the previous lines instead of merging columns in the main table using colspan whatever.
i.e.

----                  ---- ---- ----
----                  ---- ---- ----
----                  ---- ---- ----
---------- -----------
---------- -----------

Using myfaces, if that makes any difference.

Suggestions?