You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Danny Mandel <dm...@tolweb.org> on 2006/08/22 00:31:43 UTC

return to a specified anchor in a page from a listener method?

Hi all,

I know that it wasn't possible (through the framework) in Tapestry 3 to 
return a specific page at a specific anchor from a listener method.  Is 
this now possible in Tapestry 4?  If not, does anyone have any 
suggestions for working around this?  I've written some javascript to 
refresh the page location in the onload method, but it's unreliable.

Thanks for any suggestions,
Danny

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: return to a specified anchor in a page from a listener method?

Posted by andyhot <an...@di.uoa.gr>.
Will this also handle transparent redirect-after-post ?

Jesse Kuhnert wrote:
> I feel very strongly that we should strive to make these things as
> simple as
> possible for people to use/understand - even if it means we have to jump
> through giant hoops behind the scenes to make it all work properly in
> most
> use cases.
>
> There is zero doubt in my mind that I can implement this feature
> properly in
> all scenerios.
> On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>>
>> Jesse Kuhnert wrote:
>> > I think that's the whole point. There isn't really supposed to be a
>> very
>> > strong concept of URL's for people using Tapestry...Just pages /
>> > components
>> > /etc...
>> >
>> > I don't see why we can't do a redirect or forward when someone passes
>> > in an
>> > anchor. It wouldn't be very hard.
>> You mean that cycle.activate(IPage page, String anchor) would be
>> implemented as
>> redirecting to that page?
>> But those two actions are not equal... we've talked about this before :)
>> See http://tacoscomponents.jot.com/BugReporter/Bug35
>>
>>
>> >
>> > Maybe I've missed something?
>> >
>> > On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>> >>
>> >> How is cycle.activate related to anchors and URLs ?
>> >>
>> >> When one clicks on a direct link url, a corresponding listener is
>> >> invoked.
>> >> If *that* url doesn't already have an anchor, there's no way to
>> set one
>> >> unless
>> >> 1. we mimic browser's behavior with javascript, or
>> >> 2. we send a response and force client redirect
>> >>
>> >> For 1, perhaps net.sf.tacos.link.FixPosLinkRenderer can be of help
>> >> And 2 is straightforward...
>> >> http://wiki.apache.org/tapestry/EasyBrowserRedirection enhanced to
>> >> handle anchors
>> >> can help in Tap3
>> >>
>> >> Jesse Kuhnert wrote:
>> >> > I'm not sure yet...
>> >> >
>> >> > We have IRequestCycle.activate(IPage page) and activate(String
>> >> pageName)
>> >> > already, I guess we could add in activate(IPage page, String
>> >> anchor) and
>> >> > activate(String pageName, String anchor)...
>> >> >
>> >> > What do you think?
>> >> >
>> >> > On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>> >> >>
>> >> >> Are we talking without using client redirects, i.e. without having
>> >> the
>> >> >> listener return ILink ?
>> >> >>
>> >> >> Jesse Kuhnert wrote:
>> >> >> > There are ways to do this in Tapestry 4, but it seems
>> non-intuitive
>> >> >> > enough
>> >> >> > already that it should probable be fixed.
>> >> >> >
>> >> >> > What do you think would feel most "convenient" for you?
>> >> >> >
>> >> >> > On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
>> >> >> >>
>> >> >> >> Hi all,
>> >> >> >>
>> >> >> >> I know that it wasn't possible (through the framework) in
>> Tapestry
>> >> >> 3 to
>> >> >> >> return a specific page at a specific anchor from a listener
>> >> >> method.  Is
>> >> >> >> this now possible in Tapestry 4?  If not, does anyone have any
>> >> >> >> suggestions for working around this?  I've written some
>> javascript
>> >> to
>> >> >> >> refresh the page location in the onload method, but it's
>> >> unreliable.
>> >> >> >>
>> >> >> >> Thanks for any suggestions,
>> >> >> >> Danny
>> >> >> >>
>> >> >> >>
>> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >> --
>> >> >> 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
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> 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
>> >>
>> >>
>> >
>> >
>>
>>
>> -- 
>> 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
>>
>>
>
>


-- 
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


Re: return to a specified anchor in a page from a listener method?

Posted by Jesse Kuhnert <jk...@gmail.com>.
I feel very strongly that we should strive to make these things as simple as
possible for people to use/understand - even if it means we have to jump
through giant hoops behind the scenes to make it all work properly in most
use cases.

There is zero doubt in my mind that I can implement this feature properly in
all scenerios.

On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>
> Jesse Kuhnert wrote:
> > I think that's the whole point. There isn't really supposed to be a very
> > strong concept of URL's for people using Tapestry...Just pages /
> > components
> > /etc...
> >
> > I don't see why we can't do a redirect or forward when someone passes
> > in an
> > anchor. It wouldn't be very hard.
> You mean that cycle.activate(IPage page, String anchor) would be
> implemented as
> redirecting to that page?
> But those two actions are not equal... we've talked about this before :)
> See http://tacoscomponents.jot.com/BugReporter/Bug35
>
>
> >
> > Maybe I've missed something?
> >
> > On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
> >>
> >> How is cycle.activate related to anchors and URLs ?
> >>
> >> When one clicks on a direct link url, a corresponding listener is
> >> invoked.
> >> If *that* url doesn't already have an anchor, there's no way to set one
> >> unless
> >> 1. we mimic browser's behavior with javascript, or
> >> 2. we send a response and force client redirect
> >>
> >> For 1, perhaps net.sf.tacos.link.FixPosLinkRenderer can be of help
> >> And 2 is straightforward...
> >> http://wiki.apache.org/tapestry/EasyBrowserRedirection enhanced to
> >> handle anchors
> >> can help in Tap3
> >>
> >> Jesse Kuhnert wrote:
> >> > I'm not sure yet...
> >> >
> >> > We have IRequestCycle.activate(IPage page) and activate(String
> >> pageName)
> >> > already, I guess we could add in activate(IPage page, String
> >> anchor) and
> >> > activate(String pageName, String anchor)...
> >> >
> >> > What do you think?
> >> >
> >> > On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
> >> >>
> >> >> Are we talking without using client redirects, i.e. without having
> >> the
> >> >> listener return ILink ?
> >> >>
> >> >> Jesse Kuhnert wrote:
> >> >> > There are ways to do this in Tapestry 4, but it seems
> non-intuitive
> >> >> > enough
> >> >> > already that it should probable be fixed.
> >> >> >
> >> >> > What do you think would feel most "convenient" for you?
> >> >> >
> >> >> > On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
> >> >> >>
> >> >> >> Hi all,
> >> >> >>
> >> >> >> I know that it wasn't possible (through the framework) in
> Tapestry
> >> >> 3 to
> >> >> >> return a specific page at a specific anchor from a listener
> >> >> method.  Is
> >> >> >> this now possible in Tapestry 4?  If not, does anyone have any
> >> >> >> suggestions for working around this?  I've written some
> javascript
> >> to
> >> >> >> refresh the page location in the onload method, but it's
> >> unreliable.
> >> >> >>
> >> >> >> Thanks for any suggestions,
> >> >> >> Danny
> >> >> >>
> >> >> >>
> >> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >> --
> >> >> 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
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >> --
> >> 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
> >>
> >>
> >
> >
>
>
> --
> 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
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: return to a specified anchor in a page from a listener method?

Posted by andyhot <an...@di.uoa.gr>.
Jesse Kuhnert wrote:
> I think that's the whole point. There isn't really supposed to be a very
> strong concept of URL's for people using Tapestry...Just pages /
> components
> /etc...
>
> I don't see why we can't do a redirect or forward when someone passes
> in an
> anchor. It wouldn't be very hard.
You mean that cycle.activate(IPage page, String anchor) would be
implemented as
redirecting to that page?
But those two actions are not equal... we've talked about this before :)
See http://tacoscomponents.jot.com/BugReporter/Bug35


>
> Maybe I've missed something?
>
> On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>>
>> How is cycle.activate related to anchors and URLs ?
>>
>> When one clicks on a direct link url, a corresponding listener is
>> invoked.
>> If *that* url doesn't already have an anchor, there's no way to set one
>> unless
>> 1. we mimic browser's behavior with javascript, or
>> 2. we send a response and force client redirect
>>
>> For 1, perhaps net.sf.tacos.link.FixPosLinkRenderer can be of help
>> And 2 is straightforward...
>> http://wiki.apache.org/tapestry/EasyBrowserRedirection enhanced to
>> handle anchors
>> can help in Tap3
>>
>> Jesse Kuhnert wrote:
>> > I'm not sure yet...
>> >
>> > We have IRequestCycle.activate(IPage page) and activate(String
>> pageName)
>> > already, I guess we could add in activate(IPage page, String
>> anchor) and
>> > activate(String pageName, String anchor)...
>> >
>> > What do you think?
>> >
>> > On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>> >>
>> >> Are we talking without using client redirects, i.e. without having
>> the
>> >> listener return ILink ?
>> >>
>> >> Jesse Kuhnert wrote:
>> >> > There are ways to do this in Tapestry 4, but it seems non-intuitive
>> >> > enough
>> >> > already that it should probable be fixed.
>> >> >
>> >> > What do you think would feel most "convenient" for you?
>> >> >
>> >> > On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
>> >> >>
>> >> >> Hi all,
>> >> >>
>> >> >> I know that it wasn't possible (through the framework) in Tapestry
>> >> 3 to
>> >> >> return a specific page at a specific anchor from a listener
>> >> method.  Is
>> >> >> this now possible in Tapestry 4?  If not, does anyone have any
>> >> >> suggestions for working around this?  I've written some javascript
>> to
>> >> >> refresh the page location in the onload method, but it's
>> unreliable.
>> >> >>
>> >> >> Thanks for any suggestions,
>> >> >> Danny
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> 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
>> >>
>> >>
>> >
>> >
>>
>>
>> -- 
>> 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
>>
>>
>
>


-- 
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


Re: return to a specified anchor in a page from a listener method?

Posted by Jesse Kuhnert <jk...@gmail.com>.
I think that's the whole point. There isn't really supposed to be a very
strong concept of URL's for people using Tapestry...Just pages / components
/etc...

I don't see why we can't do a redirect or forward when someone passes in an
anchor. It wouldn't be very hard.

Maybe I've missed something?

On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>
> How is cycle.activate related to anchors and URLs ?
>
> When one clicks on a direct link url, a corresponding listener is invoked.
> If *that* url doesn't already have an anchor, there's no way to set one
> unless
> 1. we mimic browser's behavior with javascript, or
> 2. we send a response and force client redirect
>
> For 1, perhaps net.sf.tacos.link.FixPosLinkRenderer can be of help
> And 2 is straightforward...
> http://wiki.apache.org/tapestry/EasyBrowserRedirection enhanced to
> handle anchors
> can help in Tap3
>
> Jesse Kuhnert wrote:
> > I'm not sure yet...
> >
> > We have IRequestCycle.activate(IPage page) and activate(String pageName)
> > already, I guess we could add in activate(IPage page, String anchor) and
> > activate(String pageName, String anchor)...
> >
> > What do you think?
> >
> > On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
> >>
> >> Are we talking without using client redirects, i.e. without having the
> >> listener return ILink ?
> >>
> >> Jesse Kuhnert wrote:
> >> > There are ways to do this in Tapestry 4, but it seems non-intuitive
> >> > enough
> >> > already that it should probable be fixed.
> >> >
> >> > What do you think would feel most "convenient" for you?
> >> >
> >> > On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> I know that it wasn't possible (through the framework) in Tapestry
> >> 3 to
> >> >> return a specific page at a specific anchor from a listener
> >> method.  Is
> >> >> this now possible in Tapestry 4?  If not, does anyone have any
> >> >> suggestions for working around this?  I've written some javascript
> to
> >> >> refresh the page location in the onload method, but it's unreliable.
> >> >>
> >> >> Thanks for any suggestions,
> >> >> Danny
> >> >>
> >> >>
> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >> --
> >> 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
> >>
> >>
> >
> >
>
>
> --
> 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
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

How to get Tapestry to eagerly create the components/pages

Posted by Patrick Moore <pm...@yahoo.com>.
Hi there --

How do I get Tapestry to eagerly parse all component and page files so that in
production I know that there are no bad pages or components caused by, for
example, out-of-date template files? 

I would also like a cluster to be able to share the results of the parsing so
only one vm would actually do the parsiong on a given template, the other vms
would get the result just like they would get any other object shared across a
cluster. 

Ideas?

-Pat

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: return to a specified anchor in a page from a listener method?

Posted by andyhot <an...@di.uoa.gr>.
How is cycle.activate related to anchors and URLs ?

When one clicks on a direct link url, a corresponding listener is invoked.
If *that* url doesn't already have an anchor, there's no way to set one
unless
1. we mimic browser's behavior with javascript, or
2. we send a response and force client redirect

For 1, perhaps net.sf.tacos.link.FixPosLinkRenderer can be of help
And 2 is straightforward...
http://wiki.apache.org/tapestry/EasyBrowserRedirection enhanced to
handle anchors
can help in Tap3

Jesse Kuhnert wrote:
> I'm not sure yet...
>
> We have IRequestCycle.activate(IPage page) and activate(String pageName)
> already, I guess we could add in activate(IPage page, String anchor) and
> activate(String pageName, String anchor)...
>
> What do you think?
>
> On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>>
>> Are we talking without using client redirects, i.e. without having the
>> listener return ILink ?
>>
>> Jesse Kuhnert wrote:
>> > There are ways to do this in Tapestry 4, but it seems non-intuitive
>> > enough
>> > already that it should probable be fixed.
>> >
>> > What do you think would feel most "convenient" for you?
>> >
>> > On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
>> >>
>> >> Hi all,
>> >>
>> >> I know that it wasn't possible (through the framework) in Tapestry
>> 3 to
>> >> return a specific page at a specific anchor from a listener
>> method.  Is
>> >> this now possible in Tapestry 4?  If not, does anyone have any
>> >> suggestions for working around this?  I've written some javascript to
>> >> refresh the page location in the onload method, but it's unreliable.
>> >>
>> >> Thanks for any suggestions,
>> >> Danny
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>>
>>
>> -- 
>> 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
>>
>>
>
>


-- 
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


Re: return to a specified anchor in a page from a listener method?

Posted by Jesse Kuhnert <jk...@gmail.com>.
I'm not sure yet...

We have IRequestCycle.activate(IPage page) and activate(String pageName)
already, I guess we could add in activate(IPage page, String anchor) and
activate(String pageName, String anchor)...

What do you think?

On 8/21/06, andyhot <an...@di.uoa.gr> wrote:
>
> Are we talking without using client redirects, i.e. without having the
> listener return ILink ?
>
> Jesse Kuhnert wrote:
> > There are ways to do this in Tapestry 4, but it seems non-intuitive
> > enough
> > already that it should probable be fixed.
> >
> > What do you think would feel most "convenient" for you?
> >
> > On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
> >>
> >> Hi all,
> >>
> >> I know that it wasn't possible (through the framework) in Tapestry 3 to
> >> return a specific page at a specific anchor from a listener method.  Is
> >> this now possible in Tapestry 4?  If not, does anyone have any
> >> suggestions for working around this?  I've written some javascript to
> >> refresh the page location in the onload method, but it's unreliable.
> >>
> >> Thanks for any suggestions,
> >> Danny
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
>
>
> --
> 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
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Re: return to a specified anchor in a page from a listener method?

Posted by andyhot <an...@di.uoa.gr>.
Are we talking without using client redirects, i.e. without having the
listener return ILink ?

Jesse Kuhnert wrote:
> There are ways to do this in Tapestry 4, but it seems non-intuitive
> enough
> already that it should probable be fixed.
>
> What do you think would feel most "convenient" for you?
>
> On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
>>
>> Hi all,
>>
>> I know that it wasn't possible (through the framework) in Tapestry 3 to
>> return a specific page at a specific anchor from a listener method.  Is
>> this now possible in Tapestry 4?  If not, does anyone have any
>> suggestions for working around this?  I've written some javascript to
>> refresh the page location in the onload method, but it's unreliable.
>>
>> Thanks for any suggestions,
>> Danny
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>


-- 
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


Re: return to a specified anchor in a page from a listener method?

Posted by Danny Mandel <dm...@tolweb.org>.
Hi Andy,

That works for me!

Thanks,
Danny

andyhot wrote:
> Danny Mandel wrote:
>   
>> Hi,
>>
>> Thanks Jesse.  My use case was within a form listener method, so as
>> far as I could tell, there was no anchor parameter to be bound. 
>> Reading the other messages in this thread I think the
>> cycle.activate(String pageName, String anchor) would work or the idea
>> of returning an "Anchor" object  of some sort from a listener method
>> would work, too.
>>
>> Returning an ILink was my first thought, but I didn't see an easy way
>> to pass an anchor to an ILink when it was constructed.
>> What is the current supported way to render a page from a form
>> listener method to a specific anchor?
>>     
> When a listener return an ILink, Tapestry does a
> cycle.sendRedirect(link.getAbsoluteURL())
>
> I was thinking of an ILink decorator, so that your listener would do:
> return new AnchorDecorator( previousLink, "anchor")
>
> AnchorDecorator would delegate all methods to the enclosed ILink, all
> apart from getAbsoluteURL()
> This would become:
> public String getAbsoluteURL() {
>     return getAbsoluteURL(null, null, 0, _anchor, true);
> }
>
>   
>> Anyhow, many thanks to you and Andy for your consideration of this
>> matter.  It doesn't seem to be of the utmost importance, but it is a
>> bit of a rough edge in my mind.
>>
>> Danny
>>
>> Jesse Kuhnert wrote:
>>     
>>> There are ways to do this in Tapestry 4, but it seems non-intuitive
>>> enough
>>> already that it should probable be fixed.
>>>
>>> What do you think would feel most "convenient" for you?
>>>
>>> On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
>>>       
>>>> Hi all,
>>>>
>>>> I know that it wasn't possible (through the framework) in Tapestry 3 to
>>>> return a specific page at a specific anchor from a listener method.  Is
>>>> this now possible in Tapestry 4?  If not, does anyone have any
>>>> suggestions for working around this?  I've written some javascript to
>>>> refresh the page location in the onload method, but it's unreliable.
>>>>
>>>> Thanks for any suggestions,
>>>> Danny
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: return to a specified anchor in a page from a listener method?

Posted by andyhot <an...@di.uoa.gr>.
Danny Mandel wrote:
> Hi,
>
> Thanks Jesse.  My use case was within a form listener method, so as
> far as I could tell, there was no anchor parameter to be bound. 
> Reading the other messages in this thread I think the
> cycle.activate(String pageName, String anchor) would work or the idea
> of returning an "Anchor" object  of some sort from a listener method
> would work, too.
>
> Returning an ILink was my first thought, but I didn't see an easy way
> to pass an anchor to an ILink when it was constructed.
> What is the current supported way to render a page from a form
> listener method to a specific anchor?
When a listener return an ILink, Tapestry does a
cycle.sendRedirect(link.getAbsoluteURL())

I was thinking of an ILink decorator, so that your listener would do:
return new AnchorDecorator( previousLink, "anchor")

AnchorDecorator would delegate all methods to the enclosed ILink, all
apart from getAbsoluteURL()
This would become:
public String getAbsoluteURL() {
    return getAbsoluteURL(null, null, 0, _anchor, true);
}

>
> Anyhow, many thanks to you and Andy for your consideration of this
> matter.  It doesn't seem to be of the utmost importance, but it is a
> bit of a rough edge in my mind.
>
> Danny
>
> Jesse Kuhnert wrote:
>> There are ways to do this in Tapestry 4, but it seems non-intuitive
>> enough
>> already that it should probable be fixed.
>>
>> What do you think would feel most "convenient" for you?
>>
>> On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
>>>
>>> Hi all,
>>>
>>> I know that it wasn't possible (through the framework) in Tapestry 3 to
>>> return a specific page at a specific anchor from a listener method.  Is
>>> this now possible in Tapestry 4?  If not, does anyone have any
>>> suggestions for working around this?  I've written some javascript to
>>> refresh the page location in the onload method, but it's unreliable.
>>>
>>> Thanks for any suggestions,
>>> Danny
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>


-- 
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


Re: return to a specified anchor in a page from a listener method?

Posted by Danny Mandel <dm...@tolweb.org>.
Hi,

Thanks Jesse.  My use case was within a form listener method, so as far 
as I could tell, there was no anchor parameter to be bound.  Reading the 
other messages in this thread I think the cycle.activate(String 
pageName, String anchor) would work or the idea of returning an "Anchor" 
object  of some sort from a listener method would work, too.

Returning an ILink was my first thought, but I didn't see an easy way to 
pass an anchor to an ILink when it was constructed. 

What is the current supported way to render a page from a form listener 
method to a specific anchor?

Anyhow, many thanks to you and Andy for your consideration of this 
matter.  It doesn't seem to be of the utmost importance, but it is a bit 
of a rough edge in my mind.

Danny

Jesse Kuhnert wrote:
> There are ways to do this in Tapestry 4, but it seems non-intuitive 
> enough
> already that it should probable be fixed.
>
> What do you think would feel most "convenient" for you?
>
> On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
>>
>> Hi all,
>>
>> I know that it wasn't possible (through the framework) in Tapestry 3 to
>> return a specific page at a specific anchor from a listener method.  Is
>> this now possible in Tapestry 4?  If not, does anyone have any
>> suggestions for working around this?  I've written some javascript to
>> refresh the page location in the onload method, but it's unreliable.
>>
>> Thanks for any suggestions,
>> Danny
>>
>> ---------------------------------------------------------------------
>> 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


Re: return to a specified anchor in a page from a listener method?

Posted by Jesse Kuhnert <jk...@gmail.com>.
There are ways to do this in Tapestry 4, but it seems non-intuitive enough
already that it should probable be fixed.

What do you think would feel most "convenient" for you?

On 8/21/06, Danny Mandel <dm...@tolweb.org> wrote:
>
> Hi all,
>
> I know that it wasn't possible (through the framework) in Tapestry 3 to
> return a specific page at a specific anchor from a listener method.  Is
> this now possible in Tapestry 4?  If not, does anyone have any
> suggestions for working around this?  I've written some javascript to
> refresh the page location in the onload method, but it's unreliable.
>
> Thanks for any suggestions,
> Danny
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.