You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Phil Ulrich <ph...@gmail.com> on 2005/09/02 22:10:35 UTC
Multiple tables in a page (Tap 3.0.3)
I have a number of different objects that serve as models in my app.
Each of them has a variety of different elements but there are two
elements each has in common: name (getName()/setName()) and ID
(getID()/setID()).
On a single page of my app, there need to be multiple Table elements
(from the contrib library) which have one column - the name - and each
name is a DirectLink with the ID passed as a service parameter. When I
have a page with only one table, it's all good.
(Note: the tables are defined in the HTML like so:
<table jwcid="@contrib:Table" border="1" source="ognl:objects"
columns="ognl:columns" row="ognl:currentObject">
<span jwcid="NameColumnValue@Block">
<span jwcid="@DirectLink" listener="ognl:listeners.jumpTo"
parameters="ognl:currentObject.ID">
<span jwcid="@Insert" value="ognl:currentObject.name" />
</span>
</span>
</table>
ognl:columns calls getColumns(), which just returns "Name" - this is
in case columns have to be added later.)
The problem comes when I try to add a second table. The problem comes from:
<span jwcid="NameColumnValue@Block">
...
</span>
Since each type of object has a name, I have to use that form of
declaration (as far as I know, anyway...), but if I try to leave it
like that, I get an error about Multiple references to embedded
component NameColumnValue.
Is there any particular way around it? I'm using Tap 3.0.3 (and no,
upgrading to Tap 4 is not an option).
Thanks,
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Multiple tables in a page (Tap 3.0.3)
Posted by Mind Bridge <mi...@yahoo.com>.
Simply call the 'name' column in your second table to be something else,
e.g. 'name2'. So for the second table you would have
<span jwcid="Name2ColumnValue@Block">
....
That would avoid the conflict.
Phil Ulrich wrote:
>I have a number of different objects that serve as models in my app.
>Each of them has a variety of different elements but there are two
>elements each has in common: name (getName()/setName()) and ID
>(getID()/setID()).
>
>On a single page of my app, there need to be multiple Table elements
>(from the contrib library) which have one column - the name - and each
>name is a DirectLink with the ID passed as a service parameter. When I
>have a page with only one table, it's all good.
>
>(Note: the tables are defined in the HTML like so:
>
><table jwcid="@contrib:Table" border="1" source="ognl:objects"
>columns="ognl:columns" row="ognl:currentObject">
> <span jwcid="NameColumnValue@Block">
> <span jwcid="@DirectLink" listener="ognl:listeners.jumpTo"
>parameters="ognl:currentObject.ID">
> <span jwcid="@Insert" value="ognl:currentObject.name" />
> </span>
> </span>
></table>
>
>ognl:columns calls getColumns(), which just returns "Name" - this is
>in case columns have to be added later.)
>
>The problem comes when I try to add a second table. The problem comes from:
>
><span jwcid="NameColumnValue@Block">
>...
></span>
>
>Since each type of object has a name, I have to use that form of
>declaration (as far as I know, anyway...), but if I try to leave it
>like that, I get an error about Multiple references to embedded
>component NameColumnValue.
>
>Is there any particular way around it? I'm using Tap 3.0.3 (and no,
>upgrading to Tap 4 is not an option).
>
>Thanks,
>Phil
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org