Thanks Vid, I've simplified the above code for this post and have
multiple buttons. But looking into what setWidget on the
DecoratorPanel, I realised that I need to override the following:

    @Override
    protected void doAttachChildren() {
        try {
            super.doAttachChildren();
        } finally {
            // See comment in doDetachChildren for an explanation of
this call
            okButton.asWidget().onAttach();
        }
    }

    @Override
    protected void doDetachChildren() {
        try {
            super.doDetachChildren();
        } finally {
            /*
            * We need to detach the caption specifically because it is
not part of
            * the iterator of Widgets that the {@link SimplePanel}
super class
            * returns. This is similar to a {@link ComplexPanel}, but
we do not want
            * to expose the caption widget, as its just an internal
implementation.
            */
            okButton.asWidget().onDetach();
        }
    }

Thanks,

John

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to