Improvement/ernestosemedt/wicket 7059
In my project, we usually do this when we don't want a page to be serialized after an ajax request:
private void untouchPage(Page page) {
if (Session.exists()) {
// Do not re-serialize page
Session.get().getPageManager().untouchPage(page);
}
}
Did you consider this approach as well?
In my project, we usually do this when we don't want a page to be serialized after an ajax request:
private void untouchPage(Page page) { if (Session.exists()) { // Do not re-serialize page Session.get().getPageManager().untouchPage(page); } }Did you consider this approach as well?
No. You do this after each AJAX request?
I just want to be able to mark some requests as "do not generate" a page serialization.
No. You do this after each AJAX request?
I just want to be able to mark some requests as "do not generate" a page serialization.
Yes, after each ajax request that does not change the stage of the page.
I agree with @theigl that you should be able to do this without adding the new API method.
For example you could use a IRequestCycleListener that uses Session.get().getPageManager().untouchPage(page); whenever some condition is met, e.g. when a specific RequestCycle metadata is set (in the Ajax callback method).