www.emsdn.com
Class Profile: Home »» Java [Java] under "Java" »»» Two rows for every item in a Contrib:Table's source collection

Two rows for every item in a Contrib:Table's source collection


Hi,
I'd like to use the Contrib:Table to display a collection of search
results, but I'm not sure it can provide me what I wantany
suggestions would be greatly appreciated.
GUI designer wants us to provide search results in a table format
like this:
| 1 | 337-360 | lorem ipsum | blah |
| Document 337-360 is about blah and |
| 2 | 701-488 | foo mellon | fsaj |
| Document 701-488 summary/except inf|
etc.
Each result to be displayed would be rendered across 2 rows of a table,
the second row with a colspan of 4.
I'm looking at Kent Tong's excellent book (page 257) and I see that you
can break up the Table component into its composite pieces like this:
<span jwcid="@TableView">
<span jwcid="@TablePages"/>
<table>
<tr><span jwcid="@TableColumns"/></tr>
<tr jwcid="@TableRows"><td jwcid="@TableValues"/></tr>
</table>
</span>
</span>
But I'm at a bit of a loss as to how to proceed. Should I extend my own
TableRows object and have it spit out a separate row after it usually
would?
Any one out there have any code samples of something similar?
Thanks in advance,
Tom
To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org


No. 1# | By Developer Tags User at [2008-5-5] | size: 1912 bytes

Have a normal contrib:Table with 5 columns

Add a custom renderer to the 4th column
(using a correctly named @Block)

In that block add a <span jwcid="@Insert" value="ognl:tableBreak"/>

Add a method
public String getTableBreak() {
return "</td></tr><tr><td colspan='4'>";
}

Thomas.Vaughan (AT) usitc (DOT) gov wrote:
Hi,

I'd like to use the Contrib:Table to display a collection of search
results, but I'm not sure it can provide me what I wantany
suggestions would be greatly appreciated.

GUI designer wants us to provide search results in a table format
like this:

| 1 | 337-360 | lorem ipsum | blah |

| Document 337-360 is about blah and |

| 2 | 701-488 | foo mellon | fsaj |

| Document 701-488 summary/except inf|

etc.

Each result to be displayed would be rendered across 2 rows of a table,
the second row with a colspan of 4.

I'm looking at Kent Tong's excellent book (page 257) and I see that you
can break up the Table component into its composite pieces like this:

<span jwcid="@TableView">
<span jwcid="@TablePages"/>
<table>
<tr><span jwcid="@TableColumns"/></tr>
<tr jwcid="@TableRows"><td jwcid="@TableValues"/></tr>
</table>
</span>
</span>
--
But I'm at a bit of a loss as to how to proceed. Should I extend my own
TableRows object and have it spit out a separate row after it usually
would?

Any one out there have any code samples of something similar?

Thanks in advance,
Tom

To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
>
>
>



Java Hot!

Java New!


Copyright © 2008 www.emsdn.com • All rights reserved • CMS Theme by www.emsdn.com - 0.453