You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by KE Gan <kh...@gmail.com> on 2006/06/27 14:43:47 UTC
Return with "html anchor" in listener
Hi,
How do you return an ILink with a html anchor (#) from a listener in Java
class ?
To elaborate, I have a Java class that listen to a Tapestry "Submit"
component. In the listener I am returning an ILink using ExternalService and
ExternalServiceParameter (post-redirect-get). My question is, how do I
return a link with an html anchor (#) ?
I know this could be done using ExternalLink in the page specification
(.page), but how to do it from a Java class ?
I have tried Googling but couldn't find any useful info.
~KEGan
Re: Return with "html anchor" in listener
Posted by KE Gan <kh...@gmail.com>.
Hi,
Thanks for the input. I finally managed delve into the code, and this is
what I found.
There seems to be no way to give anchor to an ExternalService object or
ExternalServiceParameter object.
What I have done is wrap the the ILink instance (return from
ExternalService), with my own instance (AnchorILink; that extend the ILink
interface), and return the instance of AnchorILink from my listener method.
Hence, I add the anchor informatoin into the AnchorILink instance.
I also found that the methods with anchor in ILink interface is not called,
when the ILink instance is return from a listener method.
Thanks again.
On 7/11/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> I remember seeing anchor related items in the core EngineServiceLink just
> yesterday,
>
>
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/EngineServiceLink.java?view=markup
>
> On 7/10/06, KE Gan <kh...@gmail.com> wrote:
> >
> > Shing,
> >
> > Thanks for the input. Actually, I am using exactly, the same code as you
> > have written. However, from the documentation, I cannot seems to find
> how
> > to
> > include an 'html anchor' into the ILink.
> >
> > Now. I am quite convince that this feature is no available. I just hope
> > that
> > someone could confirm this.
> >
> > Thanks.
> >
> >
> > On 7/1/06, Shing Hing Man <ma...@yahoo.com> wrote:
> > >
> > > Have you looked at the source code for the getLink
> > > method in
> > > org.apache.tapestry.link.ExternalLink ?
> > >
> > > Copying the code from the method
> > > ExternalLink.getLink, I would have thought
> > > you need something like the following.
> > >
> > > // parameters as in the attribute parameters in
> > > ExternalLink component
> > > Object[] serviceParameters =
> > > DirectLink.constructServiceParameters(getParameters());
> > >
> > > ExternalServiceParameter esp = new
> > > ExternalServiceParameter(getTargetPage(),
> > > serviceParameters);
> > >
> > > ILink link =
> > > getExternalService().getLink(false, esp);
> > >
> > > Shing
> > >
> > > --- KE Gan <kh...@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > Apology if I am repeating here ... So anyone know
> > > > how to return an ILink
> > > > with a html anchor (#) from a listener in Java class
> > > > (using the
> > > > ExternalService object) ?
> > > >
> > > > Thanks, appreciate if anyone can give some pointers.
> > > >
> > > >
> > > > On 6/27/06, KE Gan <kh...@gmail.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > How do you return an ILink with a html anchor (#)
> > > > from a listener in Java
> > > > > class ?
> > > > >
> > > > > To elaborate, I have a Java class that listen to a
> > > > Tapestry "Submit"
> > > > > component. In the listener I am returning an ILink
> > > > using ExternalService and
> > > > > ExternalServiceParameter (post-redirect-get). My
> > > > question is, how do I
> > > > > return a link with an html anchor (#) ?
> > > > >
> > > > > I know this could be done using ExternalLink in
> > > > the page specification
> > > > > (.page), but how to do it from a Java class ?
> > > > >
> > > > > I have tried Googling but couldn't find any useful
> > > > info.
> > > > >
> > > > > ~KEGan
> > > > >
> > > >
> > >
> > > Home page :
> > > http://uk.geocities.com/matmsh/index.html
> > >
> > >
> > >
> > > ___________________________________________________________
> > > Copy addresses and emails from any email account to Yahoo! Mail -
> quick,
> > > easy and free. http://uk.docs.yahoo.com/trueswitch2.html
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>
Re: Return with "html anchor" in listener
Posted by Jesse Kuhnert <jk...@gmail.com>.
I remember seeing anchor related items in the core EngineServiceLink just
yesterday,
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/EngineServiceLink.java?view=markup
On 7/10/06, KE Gan <kh...@gmail.com> wrote:
>
> Shing,
>
> Thanks for the input. Actually, I am using exactly, the same code as you
> have written. However, from the documentation, I cannot seems to find how
> to
> include an 'html anchor' into the ILink.
>
> Now. I am quite convince that this feature is no available. I just hope
> that
> someone could confirm this.
>
> Thanks.
>
>
> On 7/1/06, Shing Hing Man <ma...@yahoo.com> wrote:
> >
> > Have you looked at the source code for the getLink
> > method in
> > org.apache.tapestry.link.ExternalLink ?
> >
> > Copying the code from the method
> > ExternalLink.getLink, I would have thought
> > you need something like the following.
> >
> > // parameters as in the attribute parameters in
> > ExternalLink component
> > Object[] serviceParameters =
> > DirectLink.constructServiceParameters(getParameters());
> >
> > ExternalServiceParameter esp = new
> > ExternalServiceParameter(getTargetPage(),
> > serviceParameters);
> >
> > ILink link =
> > getExternalService().getLink(false, esp);
> >
> > Shing
> >
> > --- KE Gan <kh...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Apology if I am repeating here ... So anyone know
> > > how to return an ILink
> > > with a html anchor (#) from a listener in Java class
> > > (using the
> > > ExternalService object) ?
> > >
> > > Thanks, appreciate if anyone can give some pointers.
> > >
> > >
> > > On 6/27/06, KE Gan <kh...@gmail.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > How do you return an ILink with a html anchor (#)
> > > from a listener in Java
> > > > class ?
> > > >
> > > > To elaborate, I have a Java class that listen to a
> > > Tapestry "Submit"
> > > > component. In the listener I am returning an ILink
> > > using ExternalService and
> > > > ExternalServiceParameter (post-redirect-get). My
> > > question is, how do I
> > > > return a link with an html anchor (#) ?
> > > >
> > > > I know this could be done using ExternalLink in
> > > the page specification
> > > > (.page), but how to do it from a Java class ?
> > > >
> > > > I have tried Googling but couldn't find any useful
> > > info.
> > > >
> > > > ~KEGan
> > > >
> > >
> >
> > Home page :
> > http://uk.geocities.com/matmsh/index.html
> >
> >
> >
> > ___________________________________________________________
> > Copy addresses and emails from any email account to Yahoo! Mail - quick,
> > easy and free. http://uk.docs.yahoo.com/trueswitch2.html
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
Re: Return with "html anchor" in listener
Posted by KE Gan <kh...@gmail.com>.
Shing,
Thanks for the input. Actually, I am using exactly, the same code as you
have written. However, from the documentation, I cannot seems to find how to
include an 'html anchor' into the ILink.
Now. I am quite convince that this feature is no available. I just hope that
someone could confirm this.
Thanks.
On 7/1/06, Shing Hing Man <ma...@yahoo.com> wrote:
>
> Have you looked at the source code for the getLink
> method in
> org.apache.tapestry.link.ExternalLink ?
>
> Copying the code from the method
> ExternalLink.getLink, I would have thought
> you need something like the following.
>
> // parameters as in the attribute parameters in
> ExternalLink component
> Object[] serviceParameters =
> DirectLink.constructServiceParameters(getParameters());
>
> ExternalServiceParameter esp = new
> ExternalServiceParameter(getTargetPage(),
> serviceParameters);
>
> ILink link =
> getExternalService().getLink(false, esp);
>
> Shing
>
> --- KE Gan <kh...@gmail.com> wrote:
>
> > Hi,
> >
> > Apology if I am repeating here ... So anyone know
> > how to return an ILink
> > with a html anchor (#) from a listener in Java class
> > (using the
> > ExternalService object) ?
> >
> > Thanks, appreciate if anyone can give some pointers.
> >
> >
> > On 6/27/06, KE Gan <kh...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > How do you return an ILink with a html anchor (#)
> > from a listener in Java
> > > class ?
> > >
> > > To elaborate, I have a Java class that listen to a
> > Tapestry "Submit"
> > > component. In the listener I am returning an ILink
> > using ExternalService and
> > > ExternalServiceParameter (post-redirect-get). My
> > question is, how do I
> > > return a link with an html anchor (#) ?
> > >
> > > I know this could be done using ExternalLink in
> > the page specification
> > > (.page), but how to do it from a Java class ?
> > >
> > > I have tried Googling but couldn't find any useful
> > info.
> > >
> > > ~KEGan
> > >
> >
>
> Home page :
> http://uk.geocities.com/matmsh/index.html
>
>
>
> ___________________________________________________________
> Copy addresses and emails from any email account to Yahoo! Mail - quick,
> easy and free. http://uk.docs.yahoo.com/trueswitch2.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Return with "html anchor" in listener
Posted by Shing Hing Man <ma...@yahoo.com>.
Have you looked at the source code for the getLink
method in
org.apache.tapestry.link.ExternalLink ?
Copying the code from the method
ExternalLink.getLink, I would have thought
you need something like the following.
// parameters as in the attribute parameters in
ExternalLink component
Object[] serviceParameters =
DirectLink.constructServiceParameters(getParameters());
ExternalServiceParameter esp = new
ExternalServiceParameter(getTargetPage(),
serviceParameters);
ILink link =
getExternalService().getLink(false, esp);
Shing
--- KE Gan <kh...@gmail.com> wrote:
> Hi,
>
> Apology if I am repeating here ... So anyone know
> how to return an ILink
> with a html anchor (#) from a listener in Java class
> (using the
> ExternalService object) ?
>
> Thanks, appreciate if anyone can give some pointers.
>
>
> On 6/27/06, KE Gan <kh...@gmail.com> wrote:
> >
> > Hi,
> >
> > How do you return an ILink with a html anchor (#)
> from a listener in Java
> > class ?
> >
> > To elaborate, I have a Java class that listen to a
> Tapestry "Submit"
> > component. In the listener I am returning an ILink
> using ExternalService and
> > ExternalServiceParameter (post-redirect-get). My
> question is, how do I
> > return a link with an html anchor (#) ?
> >
> > I know this could be done using ExternalLink in
> the page specification
> > (.page), but how to do it from a Java class ?
> >
> > I have tried Googling but couldn't find any useful
> info.
> >
> > ~KEGan
> >
>
Home page :
http://uk.geocities.com/matmsh/index.html
___________________________________________________________
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Return with "html anchor" in listener
Posted by KE Gan <kh...@gmail.com>.
Hi,
Apology if I am repeating here ... So anyone know how to return an ILink
with a html anchor (#) from a listener in Java class (using the
ExternalService object) ?
Thanks, appreciate if anyone can give some pointers.
On 6/27/06, KE Gan <kh...@gmail.com> wrote:
>
> Hi,
>
> How do you return an ILink with a html anchor (#) from a listener in Java
> class ?
>
> To elaborate, I have a Java class that listen to a Tapestry "Submit"
> component. In the listener I am returning an ILink using ExternalService and
> ExternalServiceParameter (post-redirect-get). My question is, how do I
> return a link with an html anchor (#) ?
>
> I know this could be done using ExternalLink in the page specification
> (.page), but how to do it from a Java class ?
>
> I have tried Googling but couldn't find any useful info.
>
> ~KEGan
>