> igor.vaynberg wrote:
> >
> > On 8/23/07, Sam Hough <[EMAIL PROTECTED]> wrote:
> >
> >> heh, there is nothing that automatically marks components as dirty()
> >> because
> >> wicket doesnt know what you do inside your components. wicket is
> >> unmanaged.
> >
> If I do Component.setVersioned(true) and hook in my own IPageVersionManager
> won't Wicket effectively track dirty components for me? In a lot of user
> interactions very few components will change so presumably using Wicket
> component level versioning would be more effecient for us? It won't track
> everything but since setEnabled, setVisible etc are final I've not that many
> choices...

Wicket's change tracking is only done for explicit changes though. For instance:

        private class CurrentPageChange extends Change {
                private final int currentPage;

                CurrentPageChange(int currentPage) {
                        this.currentPage = currentPage;
                }

                public void undo() {
                        setCurrentPage(currentPage);
                }
        }

    ...
    addStateChange(new CurrentPageChange(this.currentPage));


You can definitively use this for your own purposes. However, I would
think that the typical thing *you* want to react on are model changes.
You can use this mechanism for it as well, but it might be heavier
than you'd like.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to