I just updated my 1.4 SNAPSHOT to revision 676639 and I've started noticing
an error in ModalWindow when using ModalWindow.PageCreator.  It looks like
the setPageCreator method is calling setContent(empty) after setting the
page creator, which in turn sets the page creator to null.

>From ModalWindow.java rev 676639:
public void setPageCreator(PageCreator creator)
    {
        pageCreator = creator;
        setContent(empty);
    }

...

public void setContent(Component component)
    {
        if (component.getId().equals(getContentId()) == false)
        {
            throw new WicketRuntimeException("Modal window content id is
wrong.");
        }
        component.setOutputMarkupPlaceholderTag(true);
        component.setVisible(false);
        replace(component);
        shown = false;
        pageCreator = null;
    }

I have an older revision (667319) that does not have this problem; first,
setPageCreator does not call setContent(empty), and also setContent does not
set pageCreator = null.  Removing this line from setContent fixes the
problem, however I don't know what other repercussions it may have.

Regards,
Matthew.

-- 
Matthew Rollins Hanlon
http://squareoftwo.org
_____________________
Hanlon's Razor:
"Never attribute to malice that which can be adequately explained by
stupidity."
http://wikipedia.org/wiki/Hanlon's_razor

Reply via email to