public class RootDialogController extends DialogController<UiWidgetMainWindow>
DialogController for the root dialog. It simply
represents the empty main window of the application and provides a
slot to embed the actual page
dialog.PATTERN_DIALOG_ID| Constructor and Description |
|---|
RootDialogController()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected UiWidgetMainWindow |
createView()
This method creates the
view and has to be implemented for each individual dialog. |
protected DialogSlot |
doShow(DialogPlace dialogPlace)
This method gets called whenever this
DialogController is to be shown. |
protected void |
embed(DialogController<?> subDialog,
DialogSlot slot)
This method has to be overridden with the custom logic to embed a given
DialogController as
sub-dialog in a predefined slot. |
String |
getId()
This method gets the ID used to identify this object.
|
String |
getTitle()
This method gets the title of this object.
|
String |
getType()
This method determines the type of this
Dialog. |
getDialogManager, getUiContext, onRemoveChild, setUiContext, showgetView, isVisible, onHide, onReset, onShow, resetcreateLogger, doInitialize, getLoggerdoInitialized, getInitializationState, initializeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisVisiblepublic String getType()
Dialog. There are predefined TYPE_*
constants for common types in DialogConstants. However, you can simply create additional custom
types for your needs.Dialog.DialogConstants.TYPE_MAIN,
DialogConstants.TYPE_HEADER,
DialogConstants.TYPE_FOOTER,
DialogConstants.TYPE_NAVIGATION,
DialogConstants.TYPE_SIDE,
DialogConstants.TYPE_ROOTpublic String getTitle()
Object.toString() of the result if NOT nullnull if not set. The string-representation of the result (if
NOT null) needs to be suitable for end-users.public String getId()
DialogConstants.DIALOG_ID_ROOT,
DialogConstants.DIALOG_ID_PAGE,
DialogConstants.DIALOG_ID_HOMEprotected DialogSlot doShow(DialogPlace dialogPlace)
DialogController is to be shown. There are two cases to
distinguish:
DialogController is identified by the given DialogPlace. It is the leaf of the
DialogController-hierarchy that is to be displayed.show a dialog, its parent (and ancestors)
will be shown that will embed their child dialog in the DialogSlot returned by this method.root DialogController this method will never be
called.doShow in class DialogController<UiWidgetMainWindow>dialogPlace - is the DialogPlace pointing to the
direct dialog to open and containing potential parameters.DialogSlot identifying the parent
DialogController and its slot where to embed this DialogController.protected UiWidgetMainWindow createView()
view and has to be implemented for each individual dialog. createView in class AbstractDialogController<UiWidgetMainWindow>view.protected void embed(DialogController<?> subDialog, DialogSlot slot)
DialogController as
sub-dialog in a predefined slot. If this DialogController represents a leaf-dialog than can not
have sub-dialogs this method will be never called. protected void embed(The cast toDialogControllersubDialog,DialogSlotslot) { if (slot == SLOT_MAIN) {AbstractDialogController.getView().getMainSlot().setChild((UiWidgetRegular) subDialog.AbstractDialogController.getView()); } else if (slot == SLOT_NAVIGATION) { ... } else { super.embed(subDialog, slot); } }
UiWidgetRegular is legal here if you are not doing
odd things. See AbstractDialogController.getView() for details.embed in class DialogController<UiWidgetMainWindow>subDialog - is the DialogController of the sub-dialog to embed.slot - is the DialogSlot identifying the location in the view where the
subDialog shall be embedded.Copyright © 2001–2016 mmm-Team. All rights reserved.