Wicket – Save current layout / view

I have an application in which I would like the user to ‘save the view’. I.e. I make heavy use of ajax to replace all kinds of Panel and use nested jQuery UI Layout plugin for ‘frames’.

So basically, the view is defined as the (functional) tree of components, combined with the Javascript state of the jquery plugin, combined with the ‘query’ a user has given.

I’m wondering what would be a good strategy to save this view state, and how to load it again.

I though of keeping a sort of UIState-model on the page level, and pass it to all components. The components then use specific settings of this model to initialize themselves and changes in the components should be reflected back into this state model.

However, this gets complicated when a Panel is reused in several places.

What would be a good approach? Has anyone done something similar?


Source: bookmarks

Leave a Reply