You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Rosenstrauch <da...@darose.net> on 2007/08/01 06:50:56 UTC

Sharing a model

I'm wondering:  can 2 pages share a model?  Or would this cause 
serialization problems?

Background:  I'm trying to set up a wizard-like series of pages, and it 
would make some sense for the pages to share the same model, with each 
page filling in a piece of it.

(Yes, I know about the Wizard in wicket extensions, but a) seems like 
quite possibly overkill for my needs (I don't need all the buttons and 
such) and b) it seems to have one major flaw from what I can tell: if 
you're on, say, step 2 of the wizard, and you hit the browser's "back" 
button, it doesn't take you to step 1, but rather the previous page 
before step 1.)

TIA,

DR

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Sharing a model

Posted by David Rosenstrauch <da...@darose.net>.
Eelco Hillenius wrote:
>>> and b) it seems to have one major flaw from what I can tell: if
>>> you're on, say, step 2 of the wizard, and you hit the browser's "back"
>>> button, it doesn't take you to step 1, but rather the previous page
>>> before step 1.)
>> that's not true. Why do you think that?
> 
> Oh, sorry, I misread that. Yes, *by default* the wizard is not
> versioned. That is because I think it is better to force users to use
> the provided 'previous' (or whatever you want to call it) button. You
> simply have more control over how the wizard works that way. But if
> you want to turn versioning on again, you can simply override
> isVersioned in your custom wizard and let it return true.
> 
> Eelco

Hmmm ... OK.  I'll check that out.  Thanks much!

DR


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Sharing a model

Posted by Eelco Hillenius <ee...@gmail.com>.
> > and b) it seems to have one major flaw from what I can tell: if
> > you're on, say, step 2 of the wizard, and you hit the browser's "back"
> > button, it doesn't take you to step 1, but rather the previous page
> > before step 1.)
>
> that's not true. Why do you think that?

Oh, sorry, I misread that. Yes, *by default* the wizard is not
versioned. That is because I think it is better to force users to use
the provided 'previous' (or whatever you want to call it) button. You
simply have more control over how the wizard works that way. But if
you want to turn versioning on again, you can simply override
isVersioned in your custom wizard and let it return true.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Sharing a model

Posted by Eelco Hillenius <ee...@gmail.com>.
> (Yes, I know about the Wizard in wicket extensions, but a) seems like
> quite possibly overkill for my needs

Nothing wrong with rolling your own components. Though...

> (I don't need all the buttons and such)

you can provide your own button bar by overriding newButtonBar and

> and b) it seems to have one major flaw from what I can tell: if
> you're on, say, step 2 of the wizard, and you hit the browser's "back"
> button, it doesn't take you to step 1, but rather the previous page
> before step 1.)

that's not true. Why do you think that? The wizard works mainly with
panel replacement. And in 1.3 you have the choice between a (mostly)
static model or completely dynamic model (or of course rolling your
own).

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Sharing a model

Posted by Igor Vaynberg <ig...@gmail.com>.
wont be a problem, i do it all the time

-igor

On 7/31/07, David Rosenstrauch <da...@darose.net> wrote:
>
> I'm wondering:  can 2 pages share a model?  Or would this cause
> serialization problems?
>
> Background:  I'm trying to set up a wizard-like series of pages, and it
> would make some sense for the pages to share the same model, with each
> page filling in a piece of it.
>
> (Yes, I know about the Wizard in wicket extensions, but a) seems like
> quite possibly overkill for my needs (I don't need all the buttons and
> such) and b) it seems to have one major flaw from what I can tell: if
> you're on, say, step 2 of the wizard, and you hit the browser's "back"
> button, it doesn't take you to step 1, but rather the previous page
> before step 1.)
>
> TIA,
>
> DR
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>