Package overit.geocall.basic.ui
Class Window
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.Container
overit.geocall.basic.ui.Window
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Badgeable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
- Direct Known Subclasses:
TaskBarPage
This abstract class must be extended to implement a Container object that represents a page of the application
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.ui.Component
Component.Configurable, Component.ConfigurableAttribute, Component.ConfigurableAttributes, Component.FilterCriteria, Component.Registry -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected DocTypeprotected EntitySetprotected EventFirewallprotected GateKeeperprotected Stringprotected Component[]protected TimeZoneprotected booleanprotected booleanFields inherited from class overit.geocall.basic.ui.Container
_rofields, _rules, DALINK_NO, DALINK_YES, DATE_MAX, DATE_MIN, TIME_MAX, TIME_MIN, TYPE_ACTION, TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_DTZ, TYPE_EURO, TYPE_FILE, TYPE_FILES, TYPE_INTEGER, TYPE_LONG, TYPE_LONGARRAY, TYPE_MAP, TYPE_MAXDATE, TYPE_MAXTIME, TYPE_MEASURE, TYPE_MINDATE, TYPE_MINTIME, TYPE_NEWACTION, TYPE_STRING, TYPE_STRINGARRAY, TYPE_SUBSET, TYPE_SUBSETRANGE, TYPE_SUPPORT, TYPE_TIMERANGEFields inherited from class overit.geocall.ui.Control
_blank, _cleaner, _dblink, _enabled, _ro, _title, altEventIconsList, altIcon, ariaDescription, ariaLabel, badge, badgeformat, FILTER_PREFIXES, LABEL_ATTRIBUTE, LABEL_IN_LINE_ATTRIBUTE, STATE_BLANK, STATE_NORMAL, STATE_RO, STATE_ROBLANKFields inherited from class overit.geocall.ui.Component
_basic, _childrenContainers, _currentId, _gridalign, _gridcols, _gridrows, _gridvalign, _iconElement, _id, _keylabel, _label, _layoutName, _name, _parentContainer, _registryName, _shortcut, _tabindex, _transformations, _valuesContainer, aliasField, BR, configHidden, configuredLabel, configuredLabelInLine, defaultHidden, ELEMENT_BR, ELEMENT_NULL, entityContainer, entityName, extendedField, fullHeight, important, labelInLine, layoutLabel, PIXEL_IMG, safeInlineService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidBind the window to the current contextvoidaddClientResource(String name, org.apache.ecs.Element e) Adds aElementto the wrapper's set of resources to send to the client.
The element will be identified by its name.voidClear the set of scripts and stylesElementresources to send to the client.static Windowcurrent()Returns the current context's windowstatic voidUnbind the window from the contextbooleandispatchMessage(UIMessage msg) Elaborates theUIMessagepassed as parameterfinal voidgenCode()Generates the code for the Window, used in the url creation for the Servletorg.apache.ecs.ElementGets the set of scripts and stylesElementresources to send to the client.getCode()Returns the code associated to the Window, used in the url creation for the Servlet<C extends Component>
CgetComponentById(String componentId) Retrieves theComponentfrom theHashGetterthat stores the components of the Window.<C extends Component>
CgetComponentFromRegistry(String componentName) Retrieves theComponentfrom the registrygetComponentsFromRegistry(String componentPrefix) Returns anHashGettercontaining all the components that have been saved in the registry, whose registrynames start with the prefix string passed as parameterReturns theDocTypeof the Windoworg.apache.ecs.ElementReturns theElementContainerthat contains the html code of theEntitySetof the WindowReturns theEntitySetof the WindowReturns theEventFirewallassociated to the WindowReturns theGateKeeperthat is associated to the WindowReturns the registry that automatically stores all the component with a registryname and all the components explicitly inserted.Returns the name of the method that is triggered when theWindowManager.pop(Object)is executed, ie when the Window is removed from the stackReturns the array ofComponentthat are addressed when theWindowManager.pop(Object)is executed (ie the component showed when the Window is removed from the stack)getRoot()Returns theUINodethat corresponds to the root element of the Window.overit.geocall.servlet.WebSessionReturns theWebSessionto which theWindowManagercontaining the Window belongsGets the actual Time zone to use.getWM()Returns theWindowManagerto which belongs theWindowcontaining the ControlbooleanGets if inside this window there at least one grid or table that can be configured by the user.booleanisBlind()Gets if the window is a blind window or not.
If a window is blind means that the restore phase will not be managed when the window will be closed.
So with a blind window theContainer.onRestore(Object)method will not be called, when theContainer.onClose()will be called.makeSerializationTest(Alert a, Object o) Makes a list of serialization/deserialization tests of an object and fills an Alert with a table of the results, including possible errors.Removes the first element from the queue (LinkedList) of messages to elaboratepostMessage(UIMessage uim) postMessage(UIMessage uim, boolean useFirewall) Adds theUIMessageof the queue (LinkedList) of messages to elaboratevoidputComponent(String id, Component c) Puts theComponentin theHashGetterthat stores the components of the Window.voidputComponentInRegistry(String registryName, Component c) Puts theComponentin the registryvoidsetDOCTYPE(String doctype) Sets theDocTypefor the Window, depending on the string passed as parameter.voidsetHasAnEditableComponent(boolean b) Sets if inside this window there at least one grid or table that can be configured by the user.voidsetIsBlind(boolean b) Sets if the window is a blind window or not.
If a window is blind means that the restore phase will not be managed when the window will be closed.
So with a blind window theContainer.onRestore(Object)method will not be called, when theContainer.onClose()will be called.voidsetRestoreTo(Component[] cc) Sets the array ofComponentthat are addressed when theWindowManager.pop(Object)is executed (ie the component showed when the Window is removed from the stack)voidsetRestoreTo(Component cc, String method) Sets theComponentthat is addressed when theWindowManager.pop(Object)is executed (ie the component showed when the Window is removed from the stack), and the method of that component that is triggeredvoidsetTimeZone(TimeZone tz) Sets the actual time zone.protected voidsetup()Setup the ComponentvoidsetWM(WindowManager wm) Sets theWindowManagerof the WindowvoidShows theSingleUseComponentpassed as parametervoidshowPanel(String xml, Serializable params, Container caller) Show thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.voidShow thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.voidShow thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.voidshowPanel(XMLTree xmlt, String xml, Serializable params, Container caller) Show thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.voidshowPanel(XMLTree xmlt, String xml, Serializable params, Container caller, boolean refreshPage) Show thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.Methods inherited from class overit.geocall.basic.ui.Container
alert, applyRule, getBASIC, getBLANK, getHtml, getRO, getROField, onClose, onOpen, onOpenChildContainer, onRestore, onRule, prepareName, rulesNewValues, setROField, setValues, setValuesMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getCleaner, getConfigurableProperties, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getState, getTITLE, getValues, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isImportant, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setConfiguredProperty, setDBLINK, setENABLED, setFUNCTION, setModelProperties, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, ajaxQuery, appendAttribute, buildDisplayScript, buildSetupScript, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, connect, containerIterator, createAjaxFrame, deprecate, fillSetupScript, generateFlexableFullHeightContainer, generateId, getBoolean, getBoolean, getChildrenComponents, getChildrenContainers, getDefaultLabel, getDefaultLayoutLabel, getEntityContainer, getEntityName, getFullHeight, getGridAlign, getGridCols, getGridRows, getGridVAlign, getHtmlLabel, getHtmlLabel, getIcon, getId, getIdentity, getint, getLayoutLabel, getLayoutName, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setDEFAULTHIDDEN, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, setIdentity, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, setValuesContainer, stringForJs, tabIndexerMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.ui.Badgeable
badgeFormat, makeBadgedIcon
-
Field Details
-
_es
-
_restoreTo
-
_restoreMethod
-
_docType
-
_code
-
_eventFirewall
-
_gk
-
_tz
-
hasAnEditableComponent
protected boolean hasAnEditableComponent -
blind
protected boolean blind
-
-
Constructor Details
-
Window
public Window()Main constructor
-
-
Method Details
-
getEventFirewall
Returns theEventFirewallassociated to the Window- Returns:
- The firewall used to allow or deny the execution of the events
-
setDOCTYPE
Sets theDocTypefor the Window, depending on the string passed as parameter.- Parameters:
doctype- The string used to retrieve the instance of DocType. It can be "html" (DocType.HTML), "html401strict" (DocType.HTML401STRICT) or "html401transitional" (DocType.HTML401TRANSITIONAL). If the string is not recognized, it will be used theDocType.QUIRKSdeclaration.
-
setTimeZone
Sets the actual time zone.- Parameters:
tz- The Time zone to set.
-
getTimeZone
Gets the actual Time zone to use.- Returns:
- The actual time zone to use.
-
setup
protected void setup()Description copied from class:ComponentSetup the Component -
getEntitySet
Returns theEntitySetof the Window- Returns:
- The EntitySet of the Window
-
getRoot
Returns theUINodethat corresponds to the root element of the Window. In always returns the instance of the Window, which has no parent components. -
getCode
Returns the code associated to the Window, used in the url creation for the Servlet- Returns:
- The string that represents the code of the Window
-
genCode
public final void genCode()Generates the code for the Window, used in the url creation for the Servlet -
postMessage
-
postMessage
Adds theUIMessageof the queue (LinkedList) of messages to elaborate- Parameters:
uim- the message to be posteduseFirewall- to enable firewalling of unwanted messages- Returns:
- The
UIMessage
-
peekMessage
Removes the first element from the queue (LinkedList) of messages to elaborate- Returns:
- The
UIMessagethat is the first element of the queue of the messages to elaborate
-
setWM
Sets theWindowManagerof the Window- Parameters:
wm- The WindowManager to set to the Window
-
getWM
Description copied from class:ControlReturns theWindowManagerto which belongs theWindowcontaining the Control -
getSession
public overit.geocall.servlet.WebSession getSession()Returns theWebSessionto which theWindowManagercontaining the Window belongs- Returns:
- The WebSession to which the Window belongs
-
getRestoreTo
Returns the array ofComponentthat are addressed when theWindowManager.pop(Object)is executed (ie the component showed when the Window is removed from the stack)- Returns:
- The array of components that are showed when the Window is removed from the stack
-
getRestoreMethod
Returns the name of the method that is triggered when theWindowManager.pop(Object)is executed, ie when the Window is removed from the stack- Returns:
- The name of the method triggered when the Window is removed from the stack
-
setRestoreTo
Sets the array ofComponentthat are addressed when theWindowManager.pop(Object)is executed (ie the component showed when the Window is removed from the stack)- Parameters:
cc- The array of components that are showed when the Window is removed from the stack
-
setRestoreTo
Sets theComponentthat is addressed when theWindowManager.pop(Object)is executed (ie the component showed when the Window is removed from the stack), and the method of that component that is triggered- Parameters:
cc- The Component showed when the Window is removed from the stackmethod- The name of the method of the component that will be triggered
-
dispatchMessage
Elaborates theUIMessagepassed as parameter- Parameters:
msg- The UIMessage to elaborate- Returns:
trueif the message is elaborated,falseif the handler for the message does not exists
-
getRegistry
Returns the registry that automatically stores all the component with a registryname and all the components explicitly inserted. This registry can be used to retrieve the components from the Java classes or an external servlet- Returns:
- The
HashGetterused as registry for the components
-
getComponentById
Retrieves theComponentfrom theHashGetterthat stores the components of the Window.- Type Parameters:
C- The method will return the component with the correct cast to the right derived class- Parameters:
componentId- The string that corresponds to the unique identifier, used as the key to retrieve the Component from the map.- Returns:
- The instance of the Component retrieved from the map, with the correct cast to
the right derived class, or
nullif in the map there isn't an entry with the desired key
-
putComponent
Puts theComponentin theHashGetterthat stores the components of the Window. At each component is associated a string, used as unique identifier, that allows to retrieve the component- Parameters:
id- The string used as unique identifier of the componentc- The Component to be stored in the map
-
putComponentInRegistry
Puts theComponentin the registry- Parameters:
registryName- The registryname of the component, used as the key for the entryc- The Component to be stored in the registry
-
getComponentFromRegistry
Retrieves theComponentfrom the registry- Type Parameters:
C- The method will return the component with the correct cast to the right derived class- Parameters:
componentName- The string that corresponds to the registryname, used as the key to retrieve the Component from the registry.- Returns:
- The instance of the Component retrieved from the registry, with the correct cast to
the right derived class, or
nullif in the registry there isn't an entry with the desired key
-
getComponentsFromRegistry
Returns anHashGettercontaining all the components that have been saved in the registry, whose registrynames start with the prefix string passed as parameter- Parameters:
componentPrefix- The string that defines the prefix used to retrieve the components from the registry- Returns:
- The HashGetter containing the components whose registrynames start with the prefix string
-
show
Shows theSingleUseComponentpassed as parameter -
showPanel
Show thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.- Parameters:
xml- The path of xml that represents thePanelto show.caller- The caller and parent object.
-
showPanel
Show thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.- Parameters:
xml- The path of xml that represents thePanelto show.caller- The caller and parent object.refreshPage- Defines if the panel will be shown using an Ajax interaction or not. Using an Ajax interaction, the panel will be shown in a smart way, without refreshing the page, but components inside panel won't be able to manage theEntitySetof the page.
-
showPanel
Show thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.- Parameters:
xml- The path of xml that represents thePanelto show.params- ASerializableobject to pass as global variable to the Panel to show.caller- The caller and parent object.
-
showPanel
Show thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised. -
showPanel
public void showPanel(XMLTree xmlt, String xml, Serializable params, Container caller, boolean refreshPage) Show thePaneldefined by the xml passed as a parameter.
The xml passed as parameter must represent a Panel object otherwise a ClassCastException will be raised.- Parameters:
xmlt- TheXMLTreefrom which parse and create the xml of the Panel.xml- The path of xml that represents thePanelto show.caller- The caller and parent object.refreshPage- Defines if the panel will be shown using an Ajax interaction or not. Using an Ajax interaction, the panel will be shown in a smart way, without refreshing the page, but components inside panel won't be able to manage theEntitySetof the page.
-
getDocType
Returns theDocTypeof the Window- Returns:
- The DocType instance associated to the Window. If it is not forcibly set with
the
setDOCTYPE(String)method, it is by default the one set in the configuration file of the application (PropertiesUI.DOC_TYPE). If in the configuration file is not set, it will be theDocType.HTMLone.
-
getDocument
public org.apache.ecs.Element getDocument()Returns theElementContainerthat contains the html code of theEntitySetof the Window- Returns:
- The html document of the Window
-
getGateKeeper
Returns theGateKeeperthat is associated to the Window- Returns:
- The GateKeeper associated to the Window
-
makeSerializationTest
Makes a list of serialization/deserialization tests of an object and fills an Alert with a table of the results, including possible errors.- Parameters:
a- , the Alert to be preparedo- The object to be serielized an deserielizaed- Returns:
- the last algorithm deserialized object.
-
activate
Bind the window to the current context- Parameters:
window- the window to bind
-
deactivate
public static void deactivate()Unbind the window from the context -
current
Returns the current context's window- Returns:
- The current context's window
-
hasAnEditableComponent
public boolean hasAnEditableComponent()Gets if inside this window there at least one grid or table that can be configured by the user.- Returns:
trueif inside this window there at least one grid or table that can be configured by the user,falseotherwise.
-
setHasAnEditableComponent
public void setHasAnEditableComponent(boolean b) Sets if inside this window there at least one grid or table that can be configured by the user.- Parameters:
b-trueif inside this window there at least one grid or table that can be configured by the user,falseotherwise.
-
isBlind
public boolean isBlind()Gets if the window is a blind window or not.
If a window is blind means that the restore phase will not be managed when the window will be closed.
So with a blind window theContainer.onRestore(Object)method will not be called, when theContainer.onClose()will be called.- Returns:
trueif the window is a blind window,falseotherwise.
-
setIsBlind
public void setIsBlind(boolean b) Sets if the window is a blind window or not.
If a window is blind means that the restore phase will not be managed when the window will be closed.
So with a blind window theContainer.onRestore(Object)method will not be called, when theContainer.onClose()will be called.- Parameters:
b-trueif the window is a blind window,falseotherwise.
-
addClientResource
Adds aElementto the wrapper's set of resources to send to the client.
The element will be identified by its name.- Parameters:
name- The name that identify the Element.e- TheElementto send to the client.
-
getClientResources
public org.apache.ecs.Element getClientResources()Gets the set of scripts and stylesElementresources to send to the client.- Returns:
- The set of scripts and styles
Elementresources to send to the client.
-
clearClientResources
public void clearClientResources()Clear the set of scripts and stylesElementresources to send to the client.
-