Thanks a lot !!! 2009/10/29 Ulrich Stärk <u...@spielviel.de>
> Have your page implement an interface that provides methods for setting the > desired information and cast the result from componentSource.getPage() to > that interface. > The reason behind this is that the thing returned from componentSource is a > bytecode-enhanced version of your Login page and thus cannot be cast to your > Login class type directly. > > Uli > > Am 29.10.2009 15:09 schrieb Gunnar Eketrapp: > > Hi! >> >> I just switched from my own brewed secured page implementation that was >> based on checking access rights in onActivate() >> to the smarter more transparent solution outlined in Jumpstart app. >> >> I.e. ProtectedPage annotation + ProtecetdPageGateKeeper dispatcher. >> >> It works like a charm except for the fact that I have trouble informing >> the >> Login page about the failed page so that it can continue on to it >> after a successful login. My dumb solution managed this .... >> >> The problem I am having is that I dont know how to get hold of the Login >> page from within the ProtectedPageGateKeeper dispatcher. >> >> // Setup Login page to redirect to the secured page after >> the login >> Login login = (Login) componentSource.getPage(Login.class); >> login.setRedirectTo(page); >> This fails with ... >> >> [ERROR] TapestryModule.RequestExceptionHandler Processing >> of request failed with uncaught exception: >> com.tellpoker.pages.Login cannot be cast to >> com.tellpoker.pages.Login >> java.lang.ClassCastException: com.tellpoker.pages.Login >> cannot be cast to com.tellpoker.pages.Login >> >> I have also tried @InjectPage but got null instead of a page. >> >> Thanks in advance, >> Gunnar Eketrapp >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo