If you want the page to know that the page must version itself because of a model change
then you have to let the page know that (call public final void modelChanging()/ public final void modelChanged())

But in youre case the page that has the changed data is the edit page. And the backpage (Where you expect the change/version to happen?)
doesn't have anything to do with that.
So no that page doesn't have to change/versioned.

But because you use a detachable model and the object is loaded from the database, Then model versioning is not really needed
Because what is the use case of going back a version if the datatabase already is changed?

Where don't you see the results immedianlty now?
When you go from the editpage back to the view page?
This is because of youre propertymodels having directly the object and not the model of the object so that the object is loaded again from the db.

johan


On 1/27/06, Mats Norén <[EMAIL PROTECTED]> wrote:
On 1/27/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
>
> >
> > If I start over and do:
> > circular (displays the list)
> > "edit" ->
> > circular?path=1 (displays show view)
> > "edit" ->
> > circular?path=2 (displays edit view)
> > "save" ->
> > circular?path=1 (displays the same show view as before and NOT updated)
>
>
> why would it change?

Good question! :) I thought that the CircularPage would be processed
again and that would reflect the changes of the Circular - object.

> You just set a backpage back as the response.
> Is that page really changed somehow? And why should that be done, what is
> changed?

The Circular attached to the model.

When I go from the listview directly to the edit view the list
immediately reflects the changes.

I derived my code from the phonebook example and basically what I
would like to do is to insert a view page and not go directly to the
edit page.

I'm guessing that my poor understanding of how the Models are suppose
to work come into play here. :)

>
> I also see you do this:
>
> add(new Label("name", new PropertyModel( circularModel.getObject(this),
> "name")));
>
> I find that very strange because circularModel is a detachable model if that
> is the case then
> the object is reloaded. Then you shouldn't get that object on creation time
> of the label/property model
> But always when needed.
>
> add(new Label("name", new PropertyModel(circularModel, "name")));

Ok, I'll try that.

>
> So give just the model not the object inside the model.

Thanks!


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to