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 ErikVullings: http://wiki.apache.org/tapestry/AcegiSpringJava5FormBased ------------------------------------------------------------------------------ import org.apache.tapestry.RedirectException; import org.apache.tapestry.annotations.InjectObject; - import org.apache.tapestry.engine.IEngineService; + import org.apache.tapestry.annotations.InjectPage; import javax.servlet.http.HttpServletRequest; @@ -79, +79 @@ @InjectObject("service:tapestry.globals.HttpServletRequest") public abstract HttpServletRequest getHttpServletRequest(); - @InjectObject( "engine-service:page") - public abstract IEngineService getPageService(); + @InjectPage("Home") + public abstract IPage getHomePage(); - public void submit() { + public IPage submit() { UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(getUsername(), getPassword()); Authentication authResult; @@ -91, +91 @@ authResult = this.getAuthenticationManager() .authenticate(authRequest); } catch (final AuthenticationException failed) { - return; + return null; } SecurityContextHolder.getContext().setAuthentication(authResult); @@ -103, +103 @@ if(savedRequest != null) throw new RedirectException(savedRequest.getFullRequestUrl()); else - throw new RedirectException(getPageService().getLink(false, "Home").getURL()); + return getHomePage(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
