Hi Thaigo,

thanks for you answer!
Use PageRenderLinkSource to create a Link to the page you want, add the query parameters, then return it in your event handler method.
That's it. I didn't know PageRenderLinkSource, so I couldn't create the link that easily.

For other users:
    @Inject
    private PageRenderLinkSource linkSource;

    private Object onActionFromAnchorLink() {
        long parameter = 123;
Link link = linkSource.createPageRenderLinkWithContext(ExamplePageIndex.class, parameter);
        link.setAnchor("entry123");
        return link;
    }

Have a nice day!

Regards,
René

On 05/12/2012 02:38 AM, Thiago H. de Paula Figueiredo wrote:
On Fri, 11 May 2012 20:12:46 -0300, René Bernhardsgrütter <rene.bernhardsgruet...@cerder.com> wrote:

Hi T5 Users,

Hi!

is it somehow possible to add an anchor-tag (example.com/#entry123) to a page redirect? I should control this inside the POJO, not in the template (there it's no problem).

Use PageRenderLinkSource to create a Link to the page you want, add the query parameters, then return it in your event handler method.

The only way I found was by injecting the Link interface (org.apache.tapestry5.Link) but then I can't use the strong typed Java classes

Why not?

and I have to construct the URL manually.


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

Reply via email to