If they are not detachable then they are serializeable ..............are there model problems with this? if the user inncocently creates BookEditPage, when this copy happens, the new page will no longer be editing the same book model. we'd at least need to document this behavior. furthermore, if the copying doesn't /always/ happen (it depends on what components they use), things could feel a bit inconsistent to the user. sometimes it's the same page and sometimes its a copy. is there some simple thing we can tell people here? That is the whole point! If they aren't then clustering doesn't work, The webcontainer can't store the session to disk. Look at the logging of tomcat and you will see lots of errors in the log... And again make it an option that is default off then i don't see a problem. Then that bean (and beans are) must be serializeable, Again this is a requirement, not by wicket but by a webcontainer. The webcontainer can also do these things. For example if a session is not used for a while it could dump it to disk, And when it is suddenly needed again it will it read in. These are the things a webcontainer can do. No. Because we can't require that from a user. That is the whole point of detachable models. They are serializeable in a detached state but doesn't have to be in a attached state. No not stale in my eyesi don't find stale pages acceptable in anycase. Can never happen. Should never happen. back buttons should always work work (2 deep not much more) The page should still work. Only the click on the link that is deleted would throw an error. A click on a link below it should do the job just fine. But i know this is pretty hard. But thats what people are used to. The problem is that yes the row that is deleted that link that is stale The rest should work in my eyes. Why does this work when for example using struts? (i know why) But this is also doable in wicket. It is just how you design youre ListView. (and not calling modelChanged()) as i said just a matter of design. For example you delete: I have a list with 10 values Then I Don't delete one of them but i click on 7. I get an error because object is deleted because anohter users already deleted that object under my noise. So the page was already stale in youre eyes even i didn't do anything , i just rendered it. So i find staleness with delete examples not relevant You need to do this youre self anyway on those kind of lists. Because they could be changed/deleted by from any other place anyway. So i hope you get my point a bit. Staleness is a fact of live you it can happen at any time in any place even without youre doing right after you rendered youre page. So the developer should take that into account when designing the pages. So no i still don't like setting pages to stale. I don't want that to happen. yes i know but by default it sets the staleness. You should always use the latest object from the database.how change unexcepectedly? So the attach is a much better way anyway, because holding hibernate references over multipply request is a bad thing anyway, because they aren't attached anymore to a transaction. And for models that just has an id stored this is not relevant at all. (just the same hibernate object but then completely fresh again is queried) I agree for list. Those suddenly can have another entry (or lost an entry) a slightly different order ect.. But replace/removeall are called in the 'action' fase, not in the rendering. So developers should just take this into account. I think that if you have a link to set another tab. That almost all the models are still detached. Because in the component listener fase i don't think the data is asked from the models. It is another store by remove all. But then the models should be required anyhow.. yes not it is the developer ;) The container is the trigger of the clone/copy Because a container has the 2 methods: removeAll and replace.. read this: http://www.javaworld.com/javaworld/javaqa/2003-01/02-qa-0124-clone-p3.html quote: "What's even worse, ObjectOutputStream
and ObjectInputStream
perform a lot of unnecessary work. For example, writing out class
metadata (class name, field names, metadata checksum, etc.) that may
need to be reconciled with a different class version on the receiving
end is pure overhead when you serialize a class within the same ClassLoader
namespace."And we don't need that also. We just need the simplest dump of the fields. If pages/components/models wheren't being extened ;) it would be much easier to gain speed, just use Externalizeable..... johan |
- [Wicket-develop] Copy on replace implemented... Johan Compagner
- Re: [Wicket-develop] Copy on replace implemented... Jonathan Locke
- Re: [Wicket-develop] Copy on replace implemented... Johan Compagner
- Re: [Wicket-develop] Copy on replace impleme... Jonathan Locke
- Re: [Wicket-develop] Copy on replace imp... Johan Compagner
- Re: [Wicket-develop] Copy on replac... Jonathan Locke
- Re: [Wicket-develop] Copy on re... Johan Compagner
- Re: [Wicket-develop] Copy on replace imp... Eelco Hillenius
- Re: [Wicket-develop] Copy on replac... Martijn Dashorst
- Re: [Wicket-develop] Copy on re... Gili
- Re: [Wicket-develop] Copy o... Martijn Dashorst
- Re: [Wicket-develop] Copy o... Jonathan Locke
- Re: [Wicket-develop] Copy o... Jonathan Locke
