You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ra <ry...@gazeta.pl> on 2006/11/01 00:10:36 UTC
Re: links in a table
Ok. and how can I construct the url to a page ? The page name is known.
Sorry I'm a novice
Regards,
Arek
andyhot wrote:
>
> ok, so generate the String returned by getTableColumns()
> at runtime...
>
>
>
> ra wrote:
>>
>> Daniel Jue wrote:
>>
>>> I recently found a solution due to some help on this mailing list.
>>>
>>> Here's what we came up with. It displays a table of people, and the
>>> extent of people details are not known until runtime (i.e. should we
>>> display the first name, last name, email, etc)
>>>
>>> In the page file:
>>>
>>> <component id="table" type="Contrib:Table">
>>> <binding name="source" value="users"/>
>>> <binding name="columns" value="tableColumns"/>
>>> <binding name="columnsClass" value="literal:title"/>
>>> <binding name="pageSize" value="10"/>
>>> </component>
>>>
>>> In your class for that page have this method:
>>>
>>> public String getTableColumns()
>>> {
>>> //For reference
>>> //Column id:Column Title:ognl expression
>>> //value="literal:id, firstName:First name:name.firstName,
>>> // lastName:name.lastName, telNo"/>
>>>
>>> return
>>> "data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
>>> Name:getUserDetails('FIRSTNAME'),data3:Last
>>> Name:getUserDetails('LASTNAME')";
>>>
>>>
>>
>> Sorry it doesn't help. As I wrote I don't know column names at
>> development
>> time. I don't know even the class name because model is created during
>> runtime. I can give more details if it's not clear
>>
>>
>>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/links-in-a-table-tf2548557.html#a7104908
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: links in a table
Posted by Daniel Jue <te...@gmail.com>.
I would recommend Kent Tong's book. It's more of an advanced tutorial
than a book. If I didn't have it, I would not be programming in
Tapestry at all. And it was like $20US for the PDF. BTW, the pdf is
better since you can copy and paste the code, and search for examples
much quicker. Plus I can keep it on my thumb drive to use where-ever.
Are you using the Contrib Table? Or are you trying to roll your own?
The book covers both, but I really like taking advantage of the
Contrib Table's features.
I am still a Tapestry novice myself, and I reference that book everyday.
Dan
On 10/31/06, ra <ry...@gazeta.pl> wrote:
>
>
> Ok. and how can I construct the url to a page ? The page name is known.
> Sorry I'm a novice
>
> Regards,
> Arek
>
>
>
> andyhot wrote:
> >
> > ok, so generate the String returned by getTableColumns()
> > at runtime...
> >
> >
> >
> > ra wrote:
> >>
> >> Daniel Jue wrote:
> >>
> >>> I recently found a solution due to some help on this mailing list.
> >>>
> >>> Here's what we came up with. It displays a table of people, and the
> >>> extent of people details are not known until runtime (i.e. should we
> >>> display the first name, last name, email, etc)
> >>>
> >>> In the page file:
> >>>
> >>> <component id="table" type="Contrib:Table">
> >>> <binding name="source" value="users"/>
> >>> <binding name="columns" value="tableColumns"/>
> >>> <binding name="columnsClass" value="literal:title"/>
> >>> <binding name="pageSize" value="10"/>
> >>> </component>
> >>>
> >>> In your class for that page have this method:
> >>>
> >>> public String getTableColumns()
> >>> {
> >>> //For reference
> >>> //Column id:Column Title:ognl expression
> >>> //value="literal:id, firstName:First name:name.firstName,
> >>> // lastName:name.lastName, telNo"/>
> >>>
> >>> return
> >>> "data0:ID:getUserDetails('USERGUID'),data1:Email:getUserDetails('EMAIL'),data2:First
> >>> Name:getUserDetails('FIRSTNAME'),data3:Last
> >>> Name:getUserDetails('LASTNAME')";
> >>>
> >>>
> >>
> >> Sorry it doesn't help. As I wrote I don't know column names at
> >> development
> >> time. I don't know even the class name because model is created during
> >> runtime. I can give more details if it's not clear
> >>
> >>
> >>
> >
> >
> > --
> > Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> > Tapestry / Tacos developer
> > Open Source / J2EE Consulting
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/links-in-a-table-tf2548557.html#a7104908
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org