yeah, it is interesting. but i think it just underscores my point that we should not try to fix this problem in the next 2 weeks.
Johan Compagner wrote:
that it consumes far less resources is not really the case i think But it is a nice idea.
container.replace() { UndoableEdit edit = new UndoableEdit(this,REPLACE_EDIT) edit.setFirstComponent(componentThatWasReplaced) edit.setSecondComponent(newComponent) // For both ways!! undo/redo page.registerUndoable(edit); }
container.removeAll() { // loop through all components and add them to a list UndoableEdit edit = new UndoableEdit(this,REMOVEALL_EDIT) edit.setComponent(currentList) page.registerUndoable(edit); }
then when a page get rendered it noticed that it was the rendering 3 instead of 5 where it is in now
then it rollbacks all undoable edits.
could work!! the change is much bigger and many more lines of code...... but....
johan
Gili wrote:
Guys, I think I've got a really simple and elegant solution to the back button problem.
A while back I wrote my own UndoableEdit classes and posted them here: http://www.javadesktop.org/forums/thread.jspa?forumID=2&threadID=7669&me ssageID=49420#49420
It occurs to me that when a user hits Back, he is really asking for an undo operation and using the aforementioned undo framework, it is *very* easy for web developers to configure undoable edits on every step of the way.
What I propose is allowing webdevs to register UndoableEdits that define how to step back one rendering step (to step back two steps, you undo twice, etc). Our basic behavior would then be: if no UndoableEdit is registered with the previous rendering, it must not be undoable, hence hitting Back will result in a stale page.
Another huge benefit of this approach is that it is far easier to implement than cloning pages and consumes far less resources.
What do you think?
Gili
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
