Login page + post login page .... OR Getting a page from a dispatcher

View: New views
9 Messages — Rating Filter:   Alert me  

Login page + post login page .... OR Getting a page from a dispatcher

by oakstair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: Login page + post login page .... OR Getting a page from a dispatcher

by Ulrich Stärk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Login page + post login page .... OR Getting a page from a dispatcher

by oakstair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks a lot !!!

2009/10/29 Ulrich Stärk <uli@...>

> 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-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

Re: Login page + post login page .... OR Getting a page from a dispatcher

by oakstair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hum ... your advice seemed quite straighforward ....

By some reason I can't cast to the interface either ...

Weirdo ...

I have rebuild the project and restarted the APP since i thought that the
old Login.class could spoke me ...

java.lang.ClassCastException com.tellpoker.pages.Login cannot be cast to
com.tellpoker.pages.ILogin

Stack trace

   - com.tellpoker.services.ProtectedPageGateKeeper.checkAccess(ProtectedPageGateKeeper.java:147)

   - com.tellpoker.services.ProtectedPageGateKeeper.dispatch(ProtectedPageGateKeeper.java:64)

   - $Dispatcher_124a0b9d291.dispatch($Dispatcher_124a0b9d291.java)
   - $Dispatcher_124a0b9d286.dispatch($Dispatcher_124a0b9d286.java)
   - org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)

   - com.tellpoker.services.AppModule$1.service(AppModule.java:144)
   - $RequestFilter_124a0b9d285.service($RequestFilter_124a0b9d285.java)
   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
   - org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)

   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
   - org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)

   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
   - org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)

   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
   - org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)

   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
   - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)

   - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)

   - org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)

   - org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)

   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
   - $RequestHandler_124a0b9d27c.service($RequestHandler_124a0b9d27c.java)
   - org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197)

   - org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)

   - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)

   - org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)

   - $HttpServletRequestFilter_124a0b9d27b.service($HttpServletRequestFilter_124a0b9d27b.java)

   - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)

   - org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)

   - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)

   - $HttpServletRequestHandler_124a0b9d279.service($HttpServletRequestHandler_124a0b9d279.java)

   - org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)

2009/10/29 Gunnar Eketrapp <gunnar.eketrapp@...>

> Thanks a lot !!!
>
> 2009/10/29 Ulrich Stärk <uli@...>
>
> 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-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



--
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

Re: Login page + post login page .... OR Getting a page from a dispatcher

by Ulrich Stärk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's weird. It's exactly how I'm doing it:

PageCallbackContainer login = (PageCallbackContainer) componentSource.getPage(Login.class);
login.setCallback(new PageCallback(pageName, pageActivationContext, linkSource));
Link link = linkSource.createPageRenderLink(Login.class);
response.sendRedirect(link);

PageCallbackContainer is the interface implemented by the Login page class. I'm calling it from
inside a ComponentRequestFilter but that shouldn't matter.

Are you sure that Login really implements ILogin?

Cheers,

Uli

Am 29.10.2009 15:41 schrieb Gunnar Eketrapp:

> Hum ... your advice seemed quite straighforward ....
>
> By some reason I can't cast to the interface either ...
>
> Weirdo ...
>
> I have rebuild the project and restarted the APP since i thought that the
> old Login.class could spoke me ...
>
> java.lang.ClassCastException com.tellpoker.pages.Login cannot be cast to
> com.tellpoker.pages.ILogin
>
> Stack trace
>
>    - com.tellpoker.services.ProtectedPageGateKeeper.checkAccess(ProtectedPageGateKeeper.java:147)
>
>    - com.tellpoker.services.ProtectedPageGateKeeper.dispatch(ProtectedPageGateKeeper.java:64)
>
>    - $Dispatcher_124a0b9d291.dispatch($Dispatcher_124a0b9d291.java)
>    - $Dispatcher_124a0b9d286.dispatch($Dispatcher_124a0b9d286.java)
>    - org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)
>
>    - com.tellpoker.services.AppModule$1.service(AppModule.java:144)
>    - $RequestFilter_124a0b9d285.service($RequestFilter_124a0b9d285.java)
>    - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>    - org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
>
>    - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>    - org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
>
>    - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>    - org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
>
>    - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>    - org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
>
>    - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>    - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
>
>    - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
>
>    - org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
>
>    - org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
>
>    - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>    - $RequestHandler_124a0b9d27c.service($RequestHandler_124a0b9d27c.java)
>    - org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197)
>
>    - org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
>
>    - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)
>
>    - org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>
>    - $HttpServletRequestFilter_124a0b9d27b.service($HttpServletRequestFilter_124a0b9d27b.java)
>
>    - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)
>
>    - org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
>
>    - $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)
>
>    - $HttpServletRequestHandler_124a0b9d279.service($HttpServletRequestHandler_124a0b9d279.java)
>
>    - org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)
>
> 2009/10/29 Gunnar Eketrapp <gunnar.eketrapp@...>
>
>> Thanks a lot !!!
>>
>> 2009/10/29 Ulrich Stärk <uli@...>
>>
>> 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-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>
>>
>> --
>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
>> Allévägen 2A, 132 42 Saltsjö-Boo
>>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Login page + post login page .... OR Getting a page from a dispatcher

by oakstair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

Yeaa 100% sure !

                // Setup Login page to redirect to the secured page after
the login
                Object obj = componentSource.getPage(Login.class);
                ILogin login = (ILogin) obj;
                login.setRedirectTo(page);

I am using T5.1.0.5 by the way.

/Gunnar

2009/10/29 Ulrich Stärk <uli@...>

> That's weird. It's exactly how I'm doing it:
>
> PageCallbackContainer login = (PageCallbackContainer)
> componentSource.getPage(Login.class);
> login.setCallback(new PageCallback(pageName, pageActivationContext,
> linkSource));
> Link link = linkSource.createPageRenderLink(Login.class);
> response.sendRedirect(link);
>
> PageCallbackContainer is the interface implemented by the Login page class.
> I'm calling it from inside a ComponentRequestFilter but that shouldn't
> matter.
>
> Are you sure that Login really implements ILogin?
>
> Cheers,
>
> Uli
>
> Am 29.10.2009 15:41 schrieb Gunnar Eketrapp:
>
>  Hum ... your advice seemed quite straighforward ....
>>
>> By some reason I can't cast to the interface either ...
>>
>> Weirdo ...
>>
>> I have rebuild the project and restarted the APP since i thought that the
>> old Login.class could spoke me ...
>>
>> java.lang.ClassCastException com.tellpoker.pages.Login cannot be cast to
>> com.tellpoker.pages.ILogin
>>
>> Stack trace
>>
>>   -
>> com.tellpoker.services.ProtectedPageGateKeeper.checkAccess(ProtectedPageGateKeeper.java:147)
>>
>>   -
>> com.tellpoker.services.ProtectedPageGateKeeper.dispatch(ProtectedPageGateKeeper.java:64)
>>
>>   - $Dispatcher_124a0b9d291.dispatch($Dispatcher_124a0b9d291.java)
>>   - $Dispatcher_124a0b9d286.dispatch($Dispatcher_124a0b9d286.java)
>>   -
>> org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)
>>
>>   - com.tellpoker.services.AppModule$1.service(AppModule.java:144)
>>   - $RequestFilter_124a0b9d285.service($RequestFilter_124a0b9d285.java)
>>   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>>   -
>> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
>>
>>   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>>   -
>> org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
>>
>>   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>>   -
>> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
>>
>>   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>>   -
>> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
>>
>>   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>>   -
>> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
>>
>>   -
>> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
>>
>>   -
>> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
>>
>>   -
>> org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
>>
>>   - $RequestHandler_124a0b9d287.service($RequestHandler_124a0b9d287.java)
>>   - $RequestHandler_124a0b9d27c.service($RequestHandler_124a0b9d27c.java)
>>   -
>> org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197)
>>
>>   -
>> org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
>>
>>   -
>> $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)
>>
>>   -
>> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>>
>>   -
>> $HttpServletRequestFilter_124a0b9d27b.service($HttpServletRequestFilter_124a0b9d27b.java)
>>
>>   -
>> $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)
>>
>>   -
>> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
>>
>>   -
>> $HttpServletRequestHandler_124a0b9d27e.service($HttpServletRequestHandler_124a0b9d27e.java)
>>
>>   -
>> $HttpServletRequestHandler_124a0b9d279.service($HttpServletRequestHandler_124a0b9d279.java)
>>
>>   - org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)
>>
>> 2009/10/29 Gunnar Eketrapp <gunnar.eketrapp@...>
>>
>>  Thanks a lot !!!
>>>
>>> 2009/10/29 Ulrich Stärk <uli@...>
>>>
>>> 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-unsubscribe@...
>>>> For additional commands, e-mail: users-help@...
>>>>
>>>>
>>>>
>>> --
>>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
>>> Allévägen 2A, 132 42 Saltsjö-Boo
>>>
>>>
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

Re: Login page + post login page .... OR Getting a page from a dispatcher

by Thiago H. de Paula Figueiredo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Em Thu, 29 Oct 2009 18:23:37 -0200, Gunnar Eketrapp  
<gunnar.eketrapp@...> escreveu:

> Hi!

Hi!

> Yeaa 100% sure !

So where is ILogin located? It shouldn't be in the pages, components,  
mixins nor base packages, as it would be enhanced by Tapestry.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Login page + post login page .... OR Getting a page from a dispatcher

by oakstair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Aha! One moment!

2009/10/29 Thiago H. de Paula Figueiredo <thiagohp@...>

> Em Thu, 29 Oct 2009 18:23:37 -0200, Gunnar Eketrapp <
> gunnar.eketrapp@...> escreveu:
>
>  Hi!
>>
>
> Hi!
>
>  Yeaa 100% sure !
>>
>
> So where is ILogin located? It shouldn't be in the pages, components,
> mixins nor base packages, as it would be enhanced by Tapestry.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

Re: Login page + post login page .... OR Getting a page from a dispatcher

by oakstair :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Super thanks now it works!

2009/10/29 Gunnar Eketrapp <gunnar.eketrapp@...>

> Aha! One moment!
>
> 2009/10/29 Thiago H. de Paula Figueiredo <thiagohp@...>
>
> Em Thu, 29 Oct 2009 18:23:37 -0200, Gunnar Eketrapp <
>> gunnar.eketrapp@...> escreveu:
>>
>>  Hi!
>>>
>>
>> Hi!
>>
>>  Yeaa 100% sure !
>>>
>>
>> So where is ILogin located? It shouldn't be in the pages, components,
>> mixins nor base packages, as it would be enhanced by Tapestry.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, software architect and developer, Ars Machina Tecnologia da
>> Informação Ltda.
>> http://www.arsmachina.com.br
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



--
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo