You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tarun Ramakrishna Elankath <ta...@webkadai.com> on 2003/03/02 20:29:01 UTC
Simple way to create a link inside a component.
Hi all,
How can I generate (in java), a link to a page along with a query
parameter ?
I have a need for a component to obtain in a programmatic way, the href
of a link to its containing page (along with some query parameters).
This component has _no use_ for a template. It extends AbstractComponent
instead of BaseComponent, and emits xml markup in the renderComponent()
method, using the IMarkupWrite parameter object.
I don't unfortunately see any easy way to do this. Creating a DirectLink
object in java is very-very tedious, I need to implement loads of
methods in many abstract classes.
All help appreciated,
Tarun
Re: Simple way to create a link inside a component.
Posted by Geoff Longman <gl...@intelligentworks.com>.
Depending on what you are trying to accomplish, in 2.4 one might suggest
calling getLink on the Page service rather than the Direct Service.
Geoff
----- Original Message -----
From: "Tarun Ramakrishna Elankath" <ta...@webkadai.com>
To: <ta...@jakarta.apache.org>
Sent: Sunday, March 02, 2003 2:39 PM
Subject: Re: Simple way to create a link inside a component.
> Oops I feel like a dud :-()WW
>
> I guess its DirectService.getLink(IRequestCycle, IComponent, Object[]
> params)
>
> Need to try that out and hope I have it right.
>
> And all this time, I was trying to create a DirectLink object, so as to
> call getURL() on it!... AAARGH.!
>
>
>
> On Mon, 2003-03-03 at 00:59, Tarun Ramakrishna Elankath wrote:
> > Hi all,
> >
> > How can I generate (in java), a link to a page along with a query
> > parameter ?
> >
> > I have a need for a component to obtain in a programmatic way, the href
> > of a link to its containing page (along with some query parameters).
> > This component has _no use_ for a template. It extends AbstractComponent
> > instead of BaseComponent, and emits xml markup in the renderComponent()
> > method, using the IMarkupWrite parameter object.
> >
> > I don't unfortunately see any easy way to do this. Creating a DirectLink
> > object in java is very-very tedious, I need to implement loads of
> > methods in many abstract classes.
> >
> > All help appreciated,
> > Tarun
> >
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
Re: Simple way to create a link inside a component.
Posted by Tarun Ramakrishna Elankath <ta...@webkadai.com>.
Oops I feel like a dud :-()WW
I guess its DirectService.getLink(IRequestCycle, IComponent, Object[]
params)
Need to try that out and hope I have it right.
And all this time, I was trying to create a DirectLink object, so as to
call getURL() on it!... AAARGH.!
On Mon, 2003-03-03 at 00:59, Tarun Ramakrishna Elankath wrote:
> Hi all,
>
> How can I generate (in java), a link to a page along with a query
> parameter ?
>
> I have a need for a component to obtain in a programmatic way, the href
> of a link to its containing page (along with some query parameters).
> This component has _no use_ for a template. It extends AbstractComponent
> instead of BaseComponent, and emits xml markup in the renderComponent()
> method, using the IMarkupWrite parameter object.
>
> I don't unfortunately see any easy way to do this. Creating a DirectLink
> object in java is very-very tedious, I need to implement loads of
> methods in many abstract classes.
>
> All help appreciated,
> Tarun
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>