Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The following page has been changed by StefanEsterer: http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess The comment on the change is: no need to instantiate the ComponentSource for yourself. inject it ------------------------------------------------------------------------------ private ApplicationStateManager asm; private UserSessionImpl newUserSession; private final ComponentClassResolver resolver; - private final RequestPageCache cache; + private final ComponentSource componentSource; /** * Receive all the services needed as constructor arguments. When we bind this * service, T5 IoC will provide all the services ! */ - public AccessController(ApplicationStateManager asm, ComponentClassResolver resolver, RequestPageCache cache, UserSessionImpl newUserSession) + public AccessController(ApplicationStateManager asm, ComponentClassResolver resolver, ComponentSource componentSource, UserSessionImpl newUserSession) { this.asm = asm; this.newUserSession = newUserSession; this.resolver = resolver; - this.cache = cache; + this.componentSource = componentSource; } public boolean dispatch(Request request, Response response) throws IOException @@ -83, +83 @@ boolean canAccess = true; /* Is the requested page private ? */ - ComponentSource cs = new ComponentSourceImpl(cache); - Component page = cs.getPage(pageName); + Component page = componentSource.getPage(pageName); Boolean privatePage = Boolean.valueOf(page.getComponentResources().getComponentModel().getMeta("private")); if (privatePage) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
