You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Matt Raible <li...@raibledesigns.com> on 2004/08/03 03:09:23 UTC
contrib:table and setting links to edit
I want to add links to a contrib:table so users can edit records. With
most MVC Frameworks, I put a link on the first column - which seems to
be the norm in most apps I've seen. However, the contrib:table seems
to advocate putting a link on the far right of the table.
1. Is it possible to easily wrap a link around the first column in the
table w/o creating new classes and such? Even if I have to create new
classes, I'd be interested in knowing how to do this. The
documentation shows how to do new columns, but not ones with links as
part of them.
2. If the "link on first column" is not possible, I can deal with the
link on the right. How do I get the id from my row into a DirectLink.
I tried using tableRow.id, but no dice:
<table jwcid="table@contrib:Table" class="list"
rowsClass="ognl:beans.evenOdd.next"
source="ognl:userManager.users"
columns="id, firstName, lastName, !select"
arrowUpAsset="ognl:assets.upArrow"
arrowDownAsset="ognl:assets.downArrow"/>
<span jwcid="selectColumnHeader@Block"> </span>
<span jwcid="selectColumnValue@Block">
<a jwcid="@DirectLink" listener="ognl:listeners.edit"
parameters="ognl:components.table.tableRow.id">Edit</a>
</span>
Thanks,
Matt
Using xml, xml db and tapestry.
Posted by Nikos Batalas <am...@yahoo.gr>.
Hi everyone, I wish to ask your advice on the following subject.
I am developing a virtual museum on the web as a university project. The
museum has a catalogue of objects
that need to be browsable and searchable, by name, author, category and so
on.
I am thinking about using xml to describe those objects and an xml-native
database
(berkeley xml db for now) for storing. I find the diversity of content
that this setup
allows for storing appealing, especially for creating on-line exhibitions,
that refer
to real-life ones and are very diverse from each other.
So using xml, it seems natural from what I've seen on the web, to go with
java and tomcat.
I would very much like to hear your opinions about these choices, and any
kind of advice
or comments you would have to offer.
Thanks for your time,
Nikos
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: contrib:table and setting links to edit
Posted by Matt Raible <li...@raibledesigns.com>.
On Aug 4, 2004, at 9:56 AM, Ido M. Tamir wrote:
> On Tuesday 03 August 2004 03:09, Matt Raible wrote:
>> I want to add links to a contrib:table so users can edit records.
>> With
>> most MVC Frameworks, I put a link on the first column - which seems to
>> be the norm in most apps I've seen. However, the contrib:table seems
>> to advocate putting a link on the far right of the table.
>>
>> 1. Is it possible to easily wrap a link around the first column in
>> the
>> table w/o creating new classes and such? Even if I have to create new
>> classes, I'd be interested in knowing how to do this. The
>> documentation shows how to do new columns, but not ones with links as
>> part of them.
>>
>
>> <table jwcid="table@contrib:Table" class="list"
>> rowsClass="ognl:beans.evenOdd.next"
>> source="ognl:userManager.users"
>> columns="id, firstName, lastName, !select"
>> arrowUpAsset="ognl:assets.upArrow"
>> arrowDownAsset="ognl:assets.downArrow"/>
>> <span jwcid="selectColumnHeader@Block"> </span>
>> <span jwcid="selectColumnValue@Block">
>> <a jwcid="@DirectLink" listener="ognl:listeners.edit"
>> parameters="ognl:components.table.tableRow.id">Edit</a>
>> </span>
>
> use the Id column as your changed block and insert your Id into the
> direct
> link.
>
> <span jwcid="idColumnValue@Block">
> <a jwcid="@DirectLink" listener="ognl:listeners.edit"
> parameters="ognl:components.table.tableRow.id">
> <a jwcid="@Insert" value="ognl:components.table.tableRow.id"></a>
> </a>
> </span>
I ended up doing the following - which works for my needs:
<table jwcid="table@contrib:Table" class="list" id="userList"
rowsClass="ognl:beans.evenOdd.next" row="ognl:row"
source="ognl:userManager.users" columns="id, firstName, lastName"
arrowUpAsset="ognl:assets.upArrow"
arrowDownAsset="ognl:assets.downArrow">
<tr jwcid="idColumnValue@Block">
<a jwcid="@DirectLink" listener="ognl:listeners.edit"
parameters="ognl:row.id">
<span jwcid="@Insert" value="ognl:row.id"/>
</a>
</tr>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: contrib:table and setting links to edit
Posted by "Ido M. Tamir" <ta...@imp.univie.ac.at>.
On Tuesday 03 August 2004 03:09, Matt Raible wrote:
> I want to add links to a contrib:table so users can edit records. With
> most MVC Frameworks, I put a link on the first column - which seems to
> be the norm in most apps I've seen. However, the contrib:table seems
> to advocate putting a link on the far right of the table.
>
> 1. Is it possible to easily wrap a link around the first column in the
> table w/o creating new classes and such? Even if I have to create new
> classes, I'd be interested in knowing how to do this. The
> documentation shows how to do new columns, but not ones with links as
> part of them.
>
> <table jwcid="table@contrib:Table" class="list"
> rowsClass="ognl:beans.evenOdd.next"
> source="ognl:userManager.users"
> columns="id, firstName, lastName, !select"
> arrowUpAsset="ognl:assets.upArrow"
> arrowDownAsset="ognl:assets.downArrow"/>
> <span jwcid="selectColumnHeader@Block"> </span>
> <span jwcid="selectColumnValue@Block">
> <a jwcid="@DirectLink" listener="ognl:listeners.edit"
> parameters="ognl:components.table.tableRow.id">Edit</a>
> </span>
use the Id column as your changed block and insert your Id into the direct
link.
<span jwcid="idColumnValue@Block">
<a jwcid="@DirectLink" listener="ognl:listeners.edit"
parameters="ognl:components.table.tableRow.id">
<a jwcid="@Insert" value="ognl:components.table.tableRow.id"></a>
</a>
</span>
best wishes
Ido
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org