On Thu, 10 Apr 2014 20:30:42 -0300, Sanket Sharma <sanketsha...@gmail.com>
wrote:
Hi,
Hi!
Is there a way to get the URL of a page with request parameters in REST
format?
Tapestry format, with page activation context, which you don't seem to
know yet, is REST format already. Please read
http://tapestry.apache.org/page-navigation.html, sections Page Render
Request on, and the experiment with onActivate() and onPassivate().
Is there a straightforward way for creating URLs like this? I was looking
at PageRenderLinkSource - I see it has add parameter method, but what
would be the parameter name in this case? Moreover, that generates URL
in the
form of query parameters. How do I generate a REST URL?
Using PageRenderLinkSource.createPageRenderLinkWithContext(...) and pass
the appropriate page activation context.
Also, what would be the best way to replace localhost/hostname for
outgoing links? Since the application will be running behind a
firewall/loadbalancer, the hostname will not be same as publicly visible
hostname.
That's called URL rewriting, specifically outgoing URL rewriting. You can
use the built-in LinkRewriter API. Google it. ;)
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org