Hi,

1) You can add custom IRCLs
2) The IRCL is shared between all sessions so do not keep state in them.
You can use RequestCycle's metadata for keeping state


On Thu, Mar 7, 2013 at 12:20 PM, Artur <a_wron...@gazeta.pl> wrote:

> Hi Everybody!
>
> We just migrated from Wicket 1.4 to Wicket 6.6.
> In previous version we used IRequestCycleProcessor
> newRequestCycleProcessor()
> Now it is gone and all RequestCycle related methods in Application are
> final.
>
> So we thought to add our own listener:
> getRequestCycleListeners().**add(new CustomRequestCycle(this));
>
> but in documentation there is info that getRequestCycleListeners():
> Returns the *unmodifiable* request list of IRequestCycleListeners in this
> application
>
> And the question: so could I add or I couldn't my own listeners like this?
>
>
> And the second question. I want to load a user with hibernate with every
> request.
> And at the end of request null it.
>
> Could I do something like this in RequestCycleListeners:
>     @Override
>     public void onBeginRequest(RequestCycle cycle) {
>         ((CustomSession)Session.get())**.loadUser();
>     }
>
>     @Override
>     public void onEndRequest(RequestCycle cycle) {
>              ((CustomSession)Session.get())**.detachUser();
>         }
>     }
>
> Becouse I am not sure if RequestCycleListeners is just one for application
> or unique for every session/user?
>
>
> Thanks for help,
> Artur
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to