org.wicketstuff.modalx
Interface ModalMgr
- All Known Implementing Classes:
- ModalXPage
public interface ModalMgr
Class Name : ModalMgr Diagram : Wicket Generic Modal Windows Project : Echobase framework Type :
interface Manages the allocation and deallocation of modal windows. An application implements
this method (typically in a base Page class) and provides for 'n' modalWindows. The markup for
that base class should include the appropriate number of modal window . For example if the
maxumum depth of modal windows was n = 2 then the base class markup should have:
and the constructor of the ModalMgr implementor should contain code like this:
// Establish the ModalWindows
modalContentWindows = new ModalContentWindow[MAX_MODALS]; for (int m = 0; m < MAX_MODALS; m++) {
ModalContentWindow modalWindow = new PbModalWindow(this, "modalWindow_" + m, true);
modalWindow.setInitialWidth(600);
modalWindow.setInitialHeight(400);
body.add(modalWindow);
modalContentWindows[m] = modalWindow;
}
- Author:
- Chris Colman
preShow
void preShow(ModalContentPanel modalContentPanel)
- Notifies the ModalMgr of that a ModelContentWindow is about to show.
The method can perform work like setting the markup variation to be used for the ModalContentPanel
via a call to ModalContentPanel.setVariation(String), among other things
NOTE: This method replaces the old trackModalVisit(IWicketModalVisit) method as that was very specific
to tracking and there are more things that are likely to be required than just visit tracking so the name
and parameter was changed.
To implement previous trackModalVisit behaviour call modalContentPanel.createModalVisit(); and do
whatever you previously did with the IWicketModalVisit object that was created
releaseModalWindow
void releaseModalWindow(ModalContentWindow modalContentWindow)
- Releases a ModalContentWindow
allocateModalWindow
ModalContentWindow allocateModalWindow()
- Allocates a ModalContentWindow.
Copyright © 2007–2014. All rights reserved.