public interface Frame extends ExpandingLayout, Component.OrderedContainer, Component.BelongToFrame, Component.Spacing, Component.Margin, Component.ActionsHolder, Component.HasIcon, Component.HasCaption
Window
.
Includes functionality for work with datasources and other windows.Modifier and Type | Interface and Description |
---|---|
static class |
Frame.MessageMode |
static class |
Frame.MessageType
Message dialog type.
|
static class |
Frame.NotificationType
Popup notification type.
|
static interface |
Frame.Wrapper |
ExpandingLayout.ExpandDirection
Component.ActionOwner, Component.ActionsHolder, Component.Alignment, Component.BelongToFrame, Component.Buffered, Component.ChildEditableController, Component.Collapsable, Component.Container, Component.ContextHelpIconClickEvent, Component.Disposable, Component.Editable, Component.EditableChangeEvent, Component.EditableChangeListener, Component.EditableChangeNotifier, Component.ExpandedStateChangeEvent, Component.ExpandedStateChangeListener, Component.Focusable, Component.HasBorder, Component.HasButtonsPanel, Component.HasCaption, Component.HasContextHelp, Component.HasFormatter, Component.HasIcon, Component.HasInputPrompt, Component.HasNamedComponents, Component.HasOptionsStyleProvider, Component.HasPresentations, Component.HasRowsCount, Component.HasSettings, Component.HasValue, Component.HasXmlDescriptor, Component.LayoutClickEvent, Component.LayoutClickListener, Component.LayoutClickNotifier, Component.Margin, Component.MouseEventDetails, Component.OptionsStyleProvider, Component.OrderedContainer, Component.OuterMargin, Component.SecuredActionsHolder, Component.ShortcutAction, Component.ShortcutNotifier, Component.ShortcutTriggeredEvent, Component.Spacing, Component.UiPermissionAware, Component.Validatable, Component.ValueChangeEvent, Component.ValueChangeListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
XML element name used to show a frame in an enclosing screen.
|
AUTO_SIZE, AUTO_SIZE_PX, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
FrameContext |
getContext() |
DialogParams |
getDialogParams()
Deprecated.
Use
WindowManager.OpenType or Window.getDialogOptions() from screen controller |
DsContext |
getDsContext() |
java.lang.String |
getMessagesPack() |
Component |
getRegisteredComponent(java.lang.String id)
INTERNAL.
|
boolean |
isValid()
Check validity by invoking validators on all components which support them.
|
Window.Editor |
openEditor(Entity item,
WindowManager.OpenType openType)
Open an edit screen for entity instance.
|
Window.Editor |
openEditor(Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open an edit screen for entity instance.
|
Window.Editor |
openEditor(Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params,
Datasource parentDs)
Open an edit screen for entity instance.
|
Window.Editor |
openEditor(java.lang.String windowAlias,
Entity item,
WindowManager.OpenType openType)
Open an edit screen.
|
Window.Editor |
openEditor(java.lang.String windowAlias,
Entity item,
WindowManager.OpenType openType,
Datasource parentDs)
Open an edit screen.
|
Window.Editor |
openEditor(java.lang.String windowAlias,
Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open an edit screen.
|
Window.Editor |
openEditor(java.lang.String windowAlias,
Entity item,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params,
Datasource parentDs)
Open an edit screen.
|
Frame |
openFrame(Component parent,
java.lang.String windowAlias)
Load a frame registered in
screens.xml and optionally show it inside a parent component of this
frame. |
Frame |
openFrame(Component parent,
java.lang.String windowAlias,
java.util.Map<java.lang.String,java.lang.Object> params)
Load a frame registered in
screens.xml and optionally show it inside a parent component of this
frame. |
Window.Lookup |
openLookup(java.lang.Class<? extends Entity> entityClass,
Window.Lookup.Handler handler,
WindowManager.OpenType openType)
Open a lookup screen.
|
Window.Lookup |
openLookup(java.lang.Class<? extends Entity> entityClass,
Window.Lookup.Handler handler,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open a lookup screen.
|
Window.Lookup |
openLookup(java.lang.String windowAlias,
Window.Lookup.Handler handler,
WindowManager.OpenType openType)
Open a lookup screen.
|
Window.Lookup |
openLookup(java.lang.String windowAlias,
Window.Lookup.Handler handler,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open a lookup screen.
|
Window |
openWindow(java.lang.String windowAlias,
WindowManager.OpenType openType)
Open a simple screen.
|
Window |
openWindow(java.lang.String windowAlias,
WindowManager.OpenType openType,
java.util.Map<java.lang.String,java.lang.Object> params)
Open a simple screen.
|
void |
registerComponent(Component component)
INTERNAL.
|
void |
setContext(FrameContext ctx)
INTERNAL.
|
void |
setDsContext(DsContext dsContext)
INTERNAL.
|
void |
setMessagesPack(java.lang.String name)
Set message pack for this frame.
|
void |
showMessageDialog(java.lang.String title,
java.lang.String message,
Frame.MessageType messageType)
Show message dialog with title and message.
|
void |
showNotification(java.lang.String caption)
Show notification with
Frame.NotificationType.HUMANIZED . |
void |
showNotification(java.lang.String caption,
Frame.NotificationType type)
Show notification.
|
void |
showNotification(java.lang.String caption,
java.lang.String description,
Frame.NotificationType type)
Show notification with caption and description.
|
void |
showOptionDialog(java.lang.String title,
java.lang.String message,
Frame.MessageType messageType,
Action[] actions)
Show options dialog with title and message.
|
void |
showOptionDialog(java.lang.String title,
java.lang.String message,
Frame.MessageType messageType,
java.util.List<Action> actions)
Show options dialog with title and message.
|
void |
showWebPage(java.lang.String url,
java.util.Map<java.lang.String,java.lang.Object> params)
Open a web page in browser.
|
void |
unregisterComponent(Component component)
INTERNAL.
|
void |
validate()
Check validity by invoking validators on all components which support them.
|
boolean |
validate(java.util.List<Component.Validatable> fields)
Check validity by invoking validators on specified components which support them
and show validation result notification.
|
boolean |
validateAll()
Check validity by invoking validators on all components which support them
and show validation result notification.
|
expand, expand, getExpandDirection, isExpanded, resetExpanded
add, getComponent, getComponentNN, indexOf
add, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, remove, removeAll
addStyleName, getAlignment, getDebugId, getHeight, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthUnits, isEnabled, isEnabledItself, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setDebugId, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getFrame, setFrame
getSpacing, setSpacing
getMargin, setMargin, setMargin, setMargin
addAction, addAction, getAction, getActionNN, getActions, removeAction, removeAction, removeAllActions
getIcon, setIcon, setIconFromSet
getCaption, getDescription, setCaption, setDescription
static final java.lang.String NAME
FrameContext getContext()
void setContext(FrameContext ctx)
void setDsContext(DsContext dsContext)
java.lang.String getMessagesPack()
void setMessagesPack(java.lang.String name)
name
- message pack namevoid registerComponent(Component component)
void unregisterComponent(Component component)
@Nullable Component getRegisteredComponent(java.lang.String id)
boolean isValid()
void validate() throws ValidationException
ValidationException
- if some components are currently in invalid stateboolean validate(java.util.List<Component.Validatable> fields)
boolean validateAll()
@Deprecated DialogParams getDialogParams()
WindowManager.OpenType
or Window.getDialogOptions()
from screen controllerDialogParams
that will be used for opening next window in modal mode.
init()
method of a screen, which is being opened in WindowManager.OpenType#DIALOG
mode, affects the current
screen itself.Window openWindow(java.lang.String windowAlias, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
windowAlias
- screen ID as defined in screens.xml
openType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerWindow openWindow(java.lang.String windowAlias, WindowManager.OpenType openType)
windowAlias
- screen ID as defined in screens.xml
openType
- how to open the screenWindow.Editor openEditor(Entity item, WindowManager.OpenType openType)
item
- entity to editopenType
- how to open the screenWindow.Editor openEditor(Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
item
- entity to editopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerWindow.Editor openEditor(Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params, Datasource parentDs)
item
- entity to editopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerparentDs
- if this parameter is not null, the editor will commit edited instance into this
datasource instead of directly to databaseWindow.Editor openEditor(java.lang.String windowAlias, Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params, Datasource parentDs)
windowAlias
- screen ID as defined in screens.xml
item
- entity to editopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerparentDs
- if this parameter is not null, the editor will commit edited instance into this
datasource instead of directly to databaseWindow.Editor openEditor(java.lang.String windowAlias, Entity item, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
windowAlias
- screen ID as defined in screens.xml
item
- entity to editopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerWindow.Editor openEditor(java.lang.String windowAlias, Entity item, WindowManager.OpenType openType, Datasource parentDs)
windowAlias
- screen ID as defined in screens.xml
item
- entity to editopenType
- how to open the screenparentDs
- if this parameter is not null, the editor will commit edited instance into this
datasource instead of directly to databaseWindow.Editor openEditor(java.lang.String windowAlias, Entity item, WindowManager.OpenType openType)
windowAlias
- screen ID as defined in screens.xml
item
- entity to editopenType
- how to open the screenWindow.Lookup openLookup(java.lang.Class<? extends Entity> entityClass, Window.Lookup.Handler handler, WindowManager.OpenType openType)
entityClass
- required class of entityhandler
- is invoked when selection confirmed and the lookup screen closesopenType
- how to open the screenWindow.Lookup openLookup(java.lang.Class<? extends Entity> entityClass, Window.Lookup.Handler handler, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
entityClass
- required class of entityhandler
- is invoked when selection confirmed and the lookup screen closesopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerWindow.Lookup openLookup(java.lang.String windowAlias, Window.Lookup.Handler handler, WindowManager.OpenType openType, java.util.Map<java.lang.String,java.lang.Object> params)
windowAlias
- screen ID as defined in screens.xml
handler
- is invoked when selection confirmed and the lookup screen closesopenType
- how to open the screenparams
- parameters to pass to init()
method of the screen's controllerWindow.Lookup openLookup(java.lang.String windowAlias, Window.Lookup.Handler handler, WindowManager.OpenType openType)
windowAlias
- screen ID as defined in screens.xml
handler
- is invoked when selection confirmed and the lookup screen closesopenType
- how to open the screenFrame openFrame(@Nullable Component parent, java.lang.String windowAlias)
screens.xml
and optionally show it inside a parent component of this
frame.parent
- if specified, all parent's subcomponents will be removed and the frame will be addedwindowAlias
- frame ID as defined in screens.xml
Frame openFrame(@Nullable Component parent, java.lang.String windowAlias, java.util.Map<java.lang.String,java.lang.Object> params)
screens.xml
and optionally show it inside a parent component of this
frame.parent
- if specified, all parent's subcomponents will be removed and the frame will be addedwindowAlias
- frame ID as defined in screens.xml
params
- parameters to be passed into the frame's controller init
methodvoid showMessageDialog(java.lang.String title, java.lang.String message, Frame.MessageType messageType)
\n
).title
- dialog titlemessage
- textmessageType
- defines how to display the dialog.
Don't forget to escape data from the database in case of *_HTML
types!void showOptionDialog(java.lang.String title, java.lang.String message, Frame.MessageType messageType, Action[] actions)
\n
).title
- dialog titlemessage
- textmessageType
- defines how to display the dialog.
Don't forget to escape data from the database in case of *_HTML
types!actions
- array of actions that represent options. For standard options consider use of
DialogAction
instances.void showOptionDialog(java.lang.String title, java.lang.String message, Frame.MessageType messageType, java.util.List<Action> actions)
\n
).title
- dialog titlemessage
- textmessageType
- defines how to display the dialog.
Don't forget to escape data from the database in case of *_HTML
types!actions
- list of actions that represent options. For standard options consider use of
DialogAction
instances.void showNotification(java.lang.String caption)
caption
- notification textvoid showNotification(java.lang.String caption, Frame.NotificationType type)
\n
) for non HTML type.caption
- notification texttype
- defines how to display the notification.
Don't forget to escape data from the database in case of *_HTML
types!void showNotification(java.lang.String caption, java.lang.String description, Frame.NotificationType type)
\n
) for non HTML type.caption
- notification textdescription
- notification descriptiontype
- defines how to display the notification.
Don't forget to escape data from the database in case of *_HTML
types!void showWebPage(java.lang.String url, @Nullable java.util.Map<java.lang.String,java.lang.Object> params)
url
- URL of the pageparams
- optional parameters.
target
- String value used as the target name in a
window.open call in the client. This means that special values such as
"_blank", "_self", "_top", "_parent" have special meaning. If not specified, "_blank" is used. width
- Integer value specifying the width of the browser window in pixelsheight
- Integer value specifying the height of the browser window in pixelsborder
- String value specifying the border style of the window of the browser window.
Possible values are "DEFAULT", "MINIMAL", "NONE".Desktop client doesn't support any parameters and just ignores them.