Re: 2nd try: stateless AJAX behaviors in stateful page without its serialization
do you want to avoid serialization or deserialization (you talk about Session.getPage() and thats deserialization) But deserialization will not happen because the active page is stored in memory, Serialization does happen at the end of a request to store the actual content of the page, so that later on for back buttons and so on it can be restored. If you want to control a bit more what should be serialized or not look at the SecondLevelCacheStore and its pagemap. 2010/4/19 Martin Schayna > No, I want to process these requests in context of existing original page > instance, but without page serialization. > > Standard processing of ajax requests is implemented in > WebRequestCycleProcessor class, in method resolve(). This method is called > with RequestParameters instance which is only parsed request parameters like > page, pagemap and component identification. Standard wicket implementation > of resolve() searches for page by calling Session.getPage() method -- that's > ok, but calling this method calls also Session.touch() method, which causes > serialization of this page after processing request... > > What I want is: in processing some specific requests do not serialize the > page, because these requests don't change the page and they are called > continuously by design. > > I can extend WebRequestCycleProcessor and override resolve() method, but I > cannot avoid searching page by calling Session.getPage(). > > M. > > > > On 19.4.2010 10:37, Johan Compagner wrote: > >> so for that ajax request you do want to create a new page every time the >> ajax request hits? >> >> >> 2010/4/19 Martin Schayna >> >> >> >>> I have pretty stateful page with plenty of AJAX components. Most of these >>> components have behaviors, which renders JavaScript code for calling AJAX >>> requests to Java code. Because page isn't stateless, each request causes >>> serialization of page. So far so good. >>> >>> But some of these AJAX requests doesn't change page ever, so >>> serialization >>> of page isn't necessary. For example it is forward caching data for >>> (home-brewed) datagrid component. These requests are calling continuously >>> and serialization of page during each request causes delays. >>> >>> There are some projects for stateless wicket components out there, e.g. >>> http://code.google.com/p/jolira-tools/, but it solves another situation >>> -- >>> request of stateless components are processed on new instances of >>> stateless >>> pages. I want to process requests on existing stateful page instance but >>> without its serialization. >>> >>> I have tried to implement this in my own RequestCycleProcessor.resolve(), >>> but I hung on searching for page from requestParameters because >>> Session.getPage() always touches page and it causes serialization after >>> request processing. >>> >>> Is there any example, idea, whatever for implementing this in Wicket? >>> >>> Thanks, >>> >>> Martin Schayna >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >>> >>> >> >> >
Re: 2nd try: stateless AJAX behaviors in stateful page without its serialization
No, I want to process these requests in context of existing original page instance, but without page serialization. Standard processing of ajax requests is implemented in WebRequestCycleProcessor class, in method resolve(). This method is called with RequestParameters instance which is only parsed request parameters like page, pagemap and component identification. Standard wicket implementation of resolve() searches for page by calling Session.getPage() method -- that's ok, but calling this method calls also Session.touch() method, which causes serialization of this page after processing request... What I want is: in processing some specific requests do not serialize the page, because these requests don't change the page and they are called continuously by design. I can extend WebRequestCycleProcessor and override resolve() method, but I cannot avoid searching page by calling Session.getPage(). M. On 19.4.2010 10:37, Johan Compagner wrote: so for that ajax request you do want to create a new page every time the ajax request hits? 2010/4/19 Martin Schayna I have pretty stateful page with plenty of AJAX components. Most of these components have behaviors, which renders JavaScript code for calling AJAX requests to Java code. Because page isn't stateless, each request causes serialization of page. So far so good. But some of these AJAX requests doesn't change page ever, so serialization of page isn't necessary. For example it is forward caching data for (home-brewed) datagrid component. These requests are calling continuously and serialization of page during each request causes delays. There are some projects for stateless wicket components out there, e.g. http://code.google.com/p/jolira-tools/, but it solves another situation -- request of stateless components are processed on new instances of stateless pages. I want to process requests on existing stateful page instance but without its serialization. I have tried to implement this in my own RequestCycleProcessor.resolve(), but I hung on searching for page from requestParameters because Session.getPage() always touches page and it causes serialization after request processing. Is there any example, idea, whatever for implementing this in Wicket? Thanks, Martin Schayna - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: 2nd try: stateless AJAX behaviors in stateful page without its serialization
so for that ajax request you do want to create a new page every time the ajax request hits? 2010/4/19 Martin Schayna > I have pretty stateful page with plenty of AJAX components. Most of these > components have behaviors, which renders JavaScript code for calling AJAX > requests to Java code. Because page isn't stateless, each request causes > serialization of page. So far so good. > > But some of these AJAX requests doesn't change page ever, so serialization > of page isn't necessary. For example it is forward caching data for > (home-brewed) datagrid component. These requests are calling continuously > and serialization of page during each request causes delays. > > There are some projects for stateless wicket components out there, e.g. > http://code.google.com/p/jolira-tools/, but it solves another situation -- > request of stateless components are processed on new instances of stateless > pages. I want to process requests on existing stateful page instance but > without its serialization. > > I have tried to implement this in my own RequestCycleProcessor.resolve(), > but I hung on searching for page from requestParameters because > Session.getPage() always touches page and it causes serialization after > request processing. > > Is there any example, idea, whatever for implementing this in Wicket? > > Thanks, > > Martin Schayna > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
2nd try: stateless AJAX behaviors in stateful page without its serialization
I have pretty stateful page with plenty of AJAX components. Most of these components have behaviors, which renders JavaScript code for calling AJAX requests to Java code. Because page isn't stateless, each request causes serialization of page. So far so good. But some of these AJAX requests doesn't change page ever, so serialization of page isn't necessary. For example it is forward caching data for (home-brewed) datagrid component. These requests are calling continuously and serialization of page during each request causes delays. There are some projects for stateless wicket components out there, e.g. http://code.google.com/p/jolira-tools/, but it solves another situation -- request of stateless components are processed on new instances of stateless pages. I want to process requests on existing stateful page instance but without its serialization. I have tried to implement this in my own RequestCycleProcessor.resolve(), but I hung on searching for page from requestParameters because Session.getPage() always touches page and it causes serialization after request processing. Is there any example, idea, whatever for implementing this in Wicket? Thanks, Martin Schayna - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org