[prev in list] [next in list] [prev in thread] [next in thread]
List: tapestry-user
Subject: Re: Help needed with DirectLink and page parameters (Was: Contrib:Table
From: Andreas Pursian <dgc () gmx ! net>
Date: 2007-12-20 10:36:09
Message-ID: 476A4599.7000507 () gmx ! net
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Kasper,
> How can I use a DirectLink on a page that depends on a parameter, for
> instance of, on a page like this
>
> http://my.org/app?page=Article&id=27
So if i got the point, you just want to create a link that refers to a
special article wich is identified by an id ... right?
> The tapestry manual gives an example on how to use DirectLink with
> listeners:
>
> http://tapestry.apache.org/tapestry4/QuickStart/directlink.html
if you read a bit further there is a part "Passing data in the links"
... which should solve your problem.
Andreas
Kaspar Fischer wrote:
> Dear list,
>
> In order to isolate the problem, I tried to do something much simpler:
> showing
> a DirectLink on one of my pages.
>
> The tapestry manual gives an example on how to use DirectLink with
> listeners:
>
> http://tapestry.apache.org/tapestry4/QuickStart/directlink.html
> http://tapestry.apache.org/tapestry4/UsersGuide/listenermethods.html
>
> However, these examples assume that the content of the page containing the
> DirectLink does not depend on page parameters.
>
> How can I use a DirectLink on a page that depends on a parameter, for
> instance of, on a page like this
>
> http://my.org/app?page=Article&id=27
>
> The link generated by a DirectLink component is something like
>
> http://...Article,$MyComponent.$DirectLink.sdirect
>
> but does not mention the id. So the listener is executed but afterwards,
> the Article page does not know which item (namely id=27) it should show!
>
> I feel very much that I am on the wrong track and would be very glad to
> receive some help.
>
> Many thanks,
> Kaspar
>
> On 17.12.2007, at 20:50, Kaspar Fischer wrote:
> > Hm, I think my question was not well formulated. Apologies. I'll try
> > once more!
> >
> > Suppose you want to implement an index that shows all files starting with
> > "A", "B", etc. My page would show
> >
> > A B C D ... X Y Z
> >
> > and you can click on a letter to show the files starting with this letter
> > in a sortable Contrib:Table. How would I do this?
> >
> > Can somebody lead me on the right track?
> >
> > Thanks!
> > Kaspar
> >
> > On 16.12.2007, at 17:08, Kaspar Fischer wrote:
> >
> > > Hi list,
> > >
> > > How can I tell Contrib:Table to pass on page paremeters? When I click on
> > > a table column to sort it, the page that opens does not have the page
> > > parameters of the old page anymore!
> > >
> > > More precisely, my page "Page.html" uses a paremeter (nodeid) to know
> > > what content to display. So in Page.java's pageBeginRender() method I
> > > have
> > >
> > > String nodeIdParam = cycle.getParameter("nodeid");
> > >
> > > and then I load the data from a database and display a few things in
> > > a Contrib:Table.
> > >
> > > Unfortunately, the link that the Contrib:Table generates in order to
> > > sort a column does not contain the value for parameter "nodeid":
> > >
> > >
> > > http://localhost:8080/kc/Page,tableColumnComponent.linkColumn.sdirect?container= \
> > > Contrib%3ASimpleTableColumnPage&sp=APage%2C%24SortableTable.table.tableView&sp=SnodeTableTitle
> > >
> > >
> > > So when I click the link, my node does not know what data to load from
> > > the database!
> > >
> > > I think I need to tell Contrib:Table to include the nodeid in the link,
> > > right?
> > >
> > > How can I do this?
> > >
> > > Many thanks,
> > > Kaspar
>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHakWZM14O/Esx/74RAr0NAJ9pFv2K9OTzJ/zBl78ArQ3WinoH5wCgkqyC
7KlJPCE7kiJKuTgiK9N53gs=
=NXgf
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic