UI state as properties in the component should be to fine, see if using
session relative urls the problem remains

On Mon, Jul 5, 2010 at 4:10 PM, Anh <7za...@gmail.com> wrote:

> Hi,
>
> I'm having trouble on how to best implement something simple:
>
> I'm frequently finding the need to have 2 Models for a component:
>
> One Model is the bound data object (persisted),
> The other is lightweight UI state, such as whether a section is expanded,
> etc.
> The UI state is not needed outside of the component itself.
> It does not make sense to combine it with the bound data Model.
>
>
> When I first ran into this need, I tried storing the UI state as
> properties in the component, without using a model for it.
> This led to issues with the state resetting on refresh, etc.
>
> What I think I need is a Model that:
>
> * Is instantiated by the component
> * Keeps state across a page refresh
> * Ajax component refresh.
> * Leaving the page and loading the page later should reset the UI state.
> * UI state is not persisted in a DB, etc.
>
> What might be the best way to do the above?
>
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

Reply via email to