On Sun, 28 Jul 2013 17:15:08 -0300, Nomen Nominus <geribi...@outlook.com>
wrote:
My code for links is just fine, and I see no reason why it's not working
in the one case, and works in the next.
Your Dispatcher may not be working in 100% of the situations.
Maybe, following code is
public class ProtectPageService implements Dispatcher {
Dispatchers are supposed to return content in requests. This is not the
case here, so you can write a Dispatcher and make it work, but writing a
RequestFilter would be more adequate
private final static String LOGIN_PAGE = "/";
private ApplicationStateManager applicationStateManager;
private final ComponentClassResolver componentClassResolver;
private final ComponentSource componentSource;
public ProtectPageService(ApplicationStateManager asm,
ComponentClassResolver resolver, ComponentSource componentSource) {
this.applicationStateManager = asm;
this.componentClassResolver = resolver;
this.componentSource = componentSource;
}
public boolean dispatch(Request request, Response response) throws
IOException {
/*
* We need to get the Tapestry page requested by the user. So we
parse the path extracted from the request
*/
You're trying to parse URLs yourself. That's a bad idea: First, you don't
need to: the ComponentEventLinkEncoder service and its decode() methods
already do that for you. That's exactly what Tapestry itself uses. Second,
*your code* is probably not handling event URLs correctly. Just change it
to using ComponentEventLinkEncoder and it'll work.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org