You could also take a look at the Shale Dialog and how it stores info
between requests. You can use a session scoped bean and make it
available for the duration of the "dialog."
Sean
On 2/15/06, Werner Punz <[EMAIL PROTECTED]> wrote:
> Dave schrieb:
> > <t:saveState value="#{bean.a}" />
> > <t:saveState value="#{bean.b}" />
> >
> > both a and b have a reference to object c.
> >
> > After restoring states, two instances of c.
> > a and b have their own copy of c.
> >
> > Is this the expected behavior? Thanks.
> >
> Yes... what happens is that between the request both objects
> are serialized and then deserialized.
>
> What happens in your case is that the reference to c is cloned due to
> the deserialisation process.
>
> saveState is not a real scoping system it is more a simulation of one,
> it provides pseudo scopes by constant serialisation and deserialisation
> of beans, so that the data is not lost over the request boundaries and
> you do not have to take care yourself with hundreds of hidden fields.
>
>