You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Carpels Pascal <Pa...@sycron-it.com> on 2004/08/18 15:34:37 UTC
Datagrid
Hi all,
In our web application we use the contrib:table a lot and with success.
But currently we need something like a grid (a datagrid like in .Net) ,
in which we can put a checkbox component (see below)
------------------------------------------------------------------------
--------------------
| Prod.ID | Prod.Name | IsInStock | Automatic sent an Order |
------------------------------------------------------------------------
-------------------|
| 1 | product 1 | checkbox | checkbox
|
|-----------------------------------------------------------------------
-------------------|
| 2 | product 2 | checkbox | checkbox
|
|-----------------------------------------------------------------------
---------------------
| | | |
|
----------------
| Update |
----------------
The grid should be linked with a recordset, and once the user choose to
update we must update the products.
Does such a component already exists ?
If no, can I become the same result with the contrib:table component ?
Any example would be welcome(:-
Best regards,
Pascal.
Re: Datagrid
Posted by Sebastian Zaffarano <sz...@afip.gov.ar>.
for put a checkbox (or any tap component) inside a table field, you must
use the SimpleTableColumn class:
column = new SimpleTableColumn("TITLE");
column.setValueRendererSource(new BlockTableRendererSource(
new ComponentAddress(getComponent("BLOCK_NAME"))));
where "BLOCK_NAME" is a tapestry block where you put the component(s)
you want to render in the table column, bye example:
<span jwcid="check@Block">
<input jwcid="@Checkbox" type="check"/>
</span>
then, when you declare the contrib:Table component, you must add
"column" to the TableColumnModel
regards
Sebastian
El mié, 18-08-2004 a las 10:34, Carpels Pascal escribió:
> Hi all,
>
> In our web application we use the contrib:table a lot and with success.
> But currently we need something like a grid (a datagrid like in .Net) ,
> in which we can put a checkbox component (see below)
>
> ------------------------------------------------------------------------
> --------------------
> | Prod.ID | Prod.Name | IsInStock | Automatic sent an Order |
> ------------------------------------------------------------------------
> -------------------|
> | 1 | product 1 | checkbox | checkbox
> |
> |-----------------------------------------------------------------------
> -------------------|
> | 2 | product 2 | checkbox | checkbox
> |
> |-----------------------------------------------------------------------
> ---------------------
> | | | |
> |
>
> ----------------
> | Update |
> ----------------
>
> The grid should be linked with a recordset, and once the user choose to
> update we must update the products.
>
> Does such a component already exists ?
> If no, can I become the same result with the contrib:table component ?
> Any example would be welcome(:-
>
> Best regards,
> Pascal.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org