Package overit.geocall.ui
Class Component
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Identified,Tool
- Direct Known Subclasses:
AreaTitle,BrowserCache,CardField,CardIcon,CardLayout,Control,Drag,Frame,Html,Image,JFCStyle,Layout,LoadScript,Matrix,StringHelper,UIAssert
public abstract class Component
extends UINode
implements Identified, overit.geocall.marks.NameExposer, overit.geocall.marks.MethodExposer, Tool
This is an abstract class that must be extended to implements an user interface element.
The purpose of this class is to provide the methods and behaviours of a generic user interface element,
no matter if it?s target is to provide a simple graphic decoration or must manage a complex user interaction.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDecorates with this annotation all the component that are allowed to be configured by the ui configurability.static @interfaceAnnotation used to define aUIPropertyfor a specificComponent.static @interfacestatic @interfaceAnnotation that simplifies the definition of filter criteria for input components.static @interfaceQualifier used to specify a reference to anyComponentgiven its registry name. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ArrayListprotected static longprotected charprotected intprotected intprotected charprotected IconHDprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Containerprotected Stringprotected Stringprotected intprotected static HashMapprotected ValuesContainerprotected booleanprotected static final Stringprotected booleanprotected Stringprotected Booleanprotected SetPredicateprotected static final org.apache.ecs.Elementprotected static final org.apache.ecs.Elementprotected EntityContainerprotected Stringprotected booleanprotected booleanprotected Booleanprotected booleanprotected Stringstatic final StringDefines the pixel image html elementprotected SafeInlineService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringvoidajaxQuery(HttpServletRequest request, HttpServletResponse response) Method that must be extended to implements the Ajax interaction request / response logic for the Componentstatic voidappendAttribute(org.apache.ecs.ElementAttributes element, String attribute, String value) Utility method that appends the desired value to an attribute of the element.voidEvery component can add a script to the StringBuilder, script executed when the component is displayed.voidEvery component can add a script to the StringBuilder, script executed when the component is created.static StringReturns the label in which the shortcut letter (the one that follows the @ character, seecalcLabel(String)) is underlined to emphasize it and highlight to the user which letter is to be pressed to use the shortcutstatic StringReturns the label processed to remove any @ character.static StringReturns the character that defines the shortcut for the label (the one that follows the @ character, if present).booleanGets if the component is allowed to be configured or not.
A configurable component is a component for which user can edit its UI properties into the configurability panels (Form and Tables).
A component is configurable if it has the @Component.Configurableannotation and if its layout name or its name are not null.voidchanged()Defines the morphing of the component that occurs when there is an Ajax interactionvoidClear the Collection of configured UI properties.
This collection contains all the user UI properties customization applied to the component.Returns anIteratorover the collection of the childrens of the ComponentintReturns the size, i.e. the number of childrens of the Componentprotected voidconnect()Returns anIteratorover the collection of children containers of the Componentorg.apache.ecs.ConcreteElementprotected voidvoidDeprecated.protected StringGenerates an unique identifier string for the componentbooleangetBASIC()protected static booleangetBoolean(String s, boolean def) Returns the boolean value that corresponds to the string passed as first parameter.protected static booleangetBoolean(String value, Identity id, boolean def) Extension of the behaviour of thegetBoolean(String, boolean)method that allows to check the presence of the value inside the sets of functions of theIdentityReturns the children components of the ComponentReturns the collection of children containers of the ComponentGets the label set as default, before the configurability.
It can be set into the xml or into the model properties for EDM dynamics fields.Returns theEntityContainerof the Componentt.Returns the entity that will be used to validate the extended field.booleanGets if the vertical size of the component is set to full height or not.charReturns the horizontal alignment of the component within the grid's cell.intReturns the number of the columns of the grid, used for positioning, that the component fillsintReturns the number of the rows of the grid, used for positioning, that the component fillscharReturns the vertical alignment of the component within the grid's cell.abstract org.apache.ecs.ElementAbstract method that must be extended and returns the html code of the Componentorg.apache.ecs.html.LabelgetHtmlLabel(String label, boolean notnull, boolean nowrap, boolean basic, String forx) Returns theLabelelement, i.e. the html code of the component's labelorg.apache.ecs.html.LabelgetHtmlLabel(String label, boolean notnull, boolean nowrap, boolean basic, String forx, String className) Returns theLabelelement, i.e. the html code of the component's labelgetIcon()Returns theIconHDassociated to the componentgetId()Returns the unique identifier string of the component (if it'snullit generates it withgenerateId())Returns theIdentityassociated to the componentprotected static intReturns the key label of the componentgetLABEL()Returns the label of the componentGets the label that will be used into the configuration panel to identify this component.Returns thelayoutName, the name used for layout purpose such the dragging and dropping of the column for repositioninggetNAME()Returns the name of the component (seesetNAME(String))Returns the parent ComponentReturns the parentContainerof the ComponentReturns the published childs.Gets the component's registry name if component has it.Returns the shortcut of the component i.e. the character that follows the @ character.final intReturns theTeacher, the object that manages the translationsReturns theValuesContainerof the Componentt.Returns theWindowthat contains the ComponentvoidinitChilds(Container parent) Call theonInit(Container)method of all the childrens (seeUINode.getChildren()) of the ComponentbooleanGets if the component can be activated (on the UI side) when is disabled.
If the user cannot view an extended attribute but could edit it an edit icon will appear inside the field to give to the user the possibility to activate and edit the field.
The field will be submitted to the servir if activated.booleanisActive()+ Gets if the component is active or not.
If the user cannot view an extended attribute the field will be disabled and so not active.
The field's value will be not submitted to the server.booleanGets if the component is an alias extended component or not.booleanGets if the component is hidden by configurability or not.booleanGets if the component is hidden by default or not.
Attribute to use in combination with ResponsiveGrid with a name and editable attribute set to true.booleanGets if the component is an extended component or not.booleanGets if the component is important or not.protected booleanGets the real labelInLine value to apply.voidInitilizes the Component and all its childsvoidsetActivable(boolean activable) Sets if the component can be activated (on the UI side) when is disabled.
If the user cannot view an extended attribute but could edit it an edit icon will appear inside the field to give to the user the possibility to activate and edit the field.
The field will be submitted to the servir if activated.voidsetActive(boolean active) Sets if the component is active or not.
If the user cannot view an extended attribute the field will be disabled and so not active.
The field's value will be not submitted to the server.voidsetAliasField(boolean b) Sets if the component is an alias extended component or not.voidvoidsetConfigHidden(boolean b) Sets if the component is hidden by configurability or not.voidSets if the component is hidden by default or not.voidsetEntityName(String entity) Sets the entity that will be used to validate the extended field.voidsetExtendedField(boolean b) Sets if the component is an extended component or not.voidSets the vertical size of the component to fullsize.voidSets the horizontal alignment of the component within the grid's cell.voidSets the number of the columns of the grid, used for positioning, that the component will fillvoidSets the number of the rows of the grid, used for positioning, that the component will fillvoidSets the vertical alignment of the component within the grid's cell.voidSets the icon associated to the componentvoidsetIdentity(Identity identity) Sets theIdentityto the componentvoidSets if the component is an important component or not.
If a component is important it cannot be hidden via configurability and it will be validated into the seek validation phase after a submit to the server.
Otherwise, if the component is not important, no matter what kind of component it is (not null, hidden etc), it will be possible to hide and shows up it via configurability and the seek validation phase won't validate it after a submit.voidSets the label of the component; the label position depends on the type of the component, and on the positioning grid used.voidSets the label of the component; the label position depends on the type of the component, and on the positioning grid used.voidDefines if the label of the component can be wrapped or notvoidSets the label that will be used into the configuration panel to identify this component.voidsetLAYOUTNAME(String stateName) Sets thelayoutName, the name used for layout purpose such the dragging and dropping of the column for repositioning.voidSets the name of the component.voidSets the string used to retrieve the component instance within the Java classes.voidsetTooltip(org.apache.ecs.ElementAttributes el, String content) Sets the tooltip attribute on element.protected voidsetup()Setup the ComponentvoidsetValuesContainer(ValuesContainer valuesContainer) Sets theValuesContainerfor the Component.static StringReturns a processed "safe for JavaScript" version of the stringinttabIndexer(int from)
-
Field Details
-
_basic
protected boolean _basic -
BR
- See Also:
-
ELEMENT_BR
protected static final org.apache.ecs.Element ELEMENT_BR -
ELEMENT_NULL
protected static final org.apache.ecs.Element ELEMENT_NULL -
_currentId
protected static long _currentId -
_gridcols
protected int _gridcols -
_gridrows
protected int _gridrows -
_gridalign
protected char _gridalign -
_gridvalign
protected char _gridvalign -
fullHeight
protected boolean fullHeight -
defaultHidden
-
configHidden
protected boolean configHidden -
extendedField
protected boolean extendedField -
aliasField
protected boolean aliasField -
important
-
layoutLabel
-
safeInlineService
-
PIXEL_IMG
Defines the pixel image html element- See Also:
-
_registryName
-
_parentContainer
-
_valuesContainer
-
entityContainer
-
_childrenContainers
-
_name
-
_layoutName
-
_label
-
_keylabel
-
labelInLine
protected boolean labelInLine -
configuredLabelInLine
-
configuredLabel
-
_shortcut
-
_iconElement
-
_id
-
_tabindex
protected int _tabindex -
entityName
-
_transformations
-
-
Constructor Details
-
Component
public Component()Main constructor
-
-
Method Details
-
setGRIDCOLS
Sets the number of the columns of the grid, used for positioning, that the component will fill- Parameters:
s- The number of the columns
-
setGRIDROWS
Sets the number of the rows of the grid, used for positioning, that the component will fill- Parameters:
s- The number of the rows
-
setGRIDALIGN
Sets the horizontal alignment of the component within the grid's cell.- Parameters:
s- use the letter "l" to obtain a component aligned at the left;
use the letter "c" to obtain a component aligned at the center;
use the letter "r" to obtain a component aligned at the right
-
setGRIDVALIGN
Sets the vertical alignment of the component within the grid's cell.- Parameters:
s- use the letter "t" to obtain a component aligned at the top;
use the letter "m" to obtain a component aligned at the middle;
use the letter "b" to obtain a component aligned at the bottom
-
getGridCols
public int getGridCols()Returns the number of the columns of the grid, used for positioning, that the component fills- Returns:
- The number of the columns that the component fills
-
getGridRows
public int getGridRows()Returns the number of the rows of the grid, used for positioning, that the component fills- Returns:
- The number of the rows that the component fills
-
getGridAlign
public char getGridAlign()Returns the horizontal alignment of the component within the grid's cell.- Returns:
- "l" if the componentis aligned at the left;
"c" if the component is aligned at the center;
"r" if the component is aligned at the right
-
getGridVAlign
public char getGridVAlign()Returns the vertical alignment of the component within the grid's cell.- Returns:
- "t" if the componentis aligned at the top;
"m" if the component is aligned at the middle;
"b" if the component is aligned at the bottom
-
setBASIC
-
getBASIC
public boolean getBASIC() -
setFULLHEIGHT
Sets the vertical size of the component to fullsize. So, when it is sets totrue, the height of the component will occupy all the space possible- Parameters:
s- String containing the boolean value to enable fullsize mode or not.
-
getFullHeight
public boolean getFullHeight()Gets if the vertical size of the component is set to full height or not.- Returns:
trueif the vertical size of the component is set to full height,falseotherwise.
-
generateFlexableFullHeightContainer
-
setDEFAULTHIDDEN
Sets if the component is hidden by default or not.- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0").
If the string is not recognized as a boolean value, it will be used the default value, that isfalse
-
isDefaultHidden
public boolean isDefaultHidden()Gets if the component is hidden by default or not.
Attribute to use in combination with ResponsiveGrid with a name and editable attribute set to true.- Returns:
trueif the component is hidden by default orfalseotherwise.
-
setIMPORTANT
Sets if the component is an important component or not.
If a component is important it cannot be hidden via configurability and it will be validated into the seek validation phase after a submit to the server.
Otherwise, if the component is not important, no matter what kind of component it is (not null, hidden etc), it will be possible to hide and shows up it via configurability and the seek validation phase won't validate it after a submit.- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0").
If the string is not recognized as a boolean value, it will be used the default value, that is false
-
isImportant
public boolean isImportant()Gets if the component is important or not. A Component object is considered important if has a registryName attribute set.- Returns:
trueif the component is important,falseotherwise.
-
setConfigHidden
public void setConfigHidden(boolean b) Sets if the component is hidden by configurability or not. This attribute cannot be set from xml, and it's used only programmatically to define if the component must be hidden by the user interface or not. It's based upon the defaultHidden attribute concept, taking into account if the component is an important component or not.- Parameters:
b-trueorfalse
-
isConfigHidden
public boolean isConfigHidden()Gets if the component is hidden by configurability or not. This attribute cannot be set from xml, and it's used only programmatically to define if the component must be hidden by the user interface or not. It's based upon the defaultHidden attribute concept, taking into account if the component is an important component or not.- Returns:
trueif the component is hidden by default orfalseotherwise.
-
setExtendedField
public void setExtendedField(boolean b) Sets if the component is an extended component or not. Default value isfalse
A component is an extension field when is created starting from the EDM (Extensible Data Model) and it is inserted into the page using the configurability.- Parameters:
b-trueorfalse
-
isExtendedField
public boolean isExtendedField()Gets if the component is an extended component or not. A component is an extension field when is created starting from the EDM (Extensible Data Model) and it is inserted into the page using the configurability.- Returns:
trueif the component is an extension orfalseotherwise.
-
setAliasField
public void setAliasField(boolean b) Sets if the component is an alias extended component or not. Default value isfalse
A component is an alias field when is created to being an alter ego of another existing field (either static or extended).
The Alias fields are used, for example, to define a range filter criterion allowind the user to duplicate the original field and defining a range of filter criteria.- Parameters:
b-trueorfalse
-
isAliasField
public boolean isAliasField()Gets if the component is an alias extended component or not. Default value isfalse
A component is an alias field when is created to being an alter ego of another existing field (either static or extended).
The Alias fields are used, for example, to define a range filter criterion allowind the user to duplicate the original field and defining a range of filter criteria.- Returns:
trueif the component is an alias orfalseotherwise.
-
isActive
public boolean isActive()+ Gets if the component is active or not.
If the user cannot view an extended attribute the field will be disabled and so not active.
The field's value will be not submitted to the server.- Returns:
trueif the field is active,falseotherwise.
-
setActive
public void setActive(boolean active) Sets if the component is active or not.
If the user cannot view an extended attribute the field will be disabled and so not active.
The field's value will be not submitted to the server.- Parameters:
active- True or false.
-
isActivable
public boolean isActivable()Gets if the component can be activated (on the UI side) when is disabled.
If the user cannot view an extended attribute but could edit it an edit icon will appear inside the field to give to the user the possibility to activate and edit the field.
The field will be submitted to the servir if activated.- Returns:
trueif the field is activable,falseotherwise.
-
setActivable
public void setActivable(boolean activable) Sets if the component can be activated (on the UI side) when is disabled.
If the user cannot view an extended attribute but could edit it an edit icon will appear inside the field to give to the user the possibility to activate and edit the field.
The field will be submitted to the servir if activated.- Parameters:
activable- True or false.
-
setLAYOUTLABEL
Sets the label that will be used into the configuration panel to identify this component. If a component doesn't have a label set, it will be displayed without a label into the user interface, but to identify it into the configuration panel will be possible to use this attribute without changing the component behavior into the user interface.
Attribute to use in combination with ResponsiveGrid with a name and editable attribute set to true.- Parameters:
s- the string that will appear into configuration panel for this component
-
getLayoutLabel
Gets the label that will be used into the configuration panel to identify this component. If a component doesn't have a label set, it will be displayed without a label into the user interface, but to identify it into the configuration panel will be possible to use this attribute without changing the component behavior into the user interface.- Returns:
- The label that will appear into configuration panel for this component
-
getDefaultLayoutLabel
-
getDefaultLabel
Gets the label set as default, before the configurability.
It can be set into the xml or into the model properties for EDM dynamics fields.- Returns:
- the label set as default
-
generateId
Generates an unique identifier string for the component- Returns:
- The unique identifier string of the component
-
getId
Returns the unique identifier string of the component (if it'snullit generates it withgenerateId())- Returns:
- The unique identifier string of the component
-
getBoolean
Returns the boolean value that corresponds to the string passed as first parameter. If the string is not recognized as a boolean value ("true" or "1", "false" or "0"), it will be returned the default boolean value, passed as second parameter- Parameters:
s- The string that defines the boolean valuedef- The default boolean value- Returns:
- s The boolean value that corresponds to the string, or the default one
-
getBoolean
Extension of the behaviour of thegetBoolean(String, boolean)method that allows to check the presence of the value inside the sets of functions of theIdentity- Parameters:
value- A string that represents a boolean value, or a function. If the string starts with ! the search logic of the function is reversedid- identity TheIdentityof the userdef- The default boolean value- Returns:
- The boolean value that corresponds to the string if the string is recognized as a boolean; if the string is
nullor an empty string, the method returns the default value. In every other cases, the method checks if theIdentityhas the function defined by the value parameter and returnstrueif it has it, orfalseotherwise (if the search logic is reversed, the output will be the opposite)
-
getint
-
stringForJs
Returns a processed "safe for JavaScript" version of the string- Parameters:
s- The string that must be processed- Returns:
- The same string passed as parameter in which any character ' have been replaced by characters \'
-
deprecate
-
calcLabel
Returns the label processed to remove any @ character.
The character is used to indicate the shortcut to the component; by simultaneously pressing ALT and the letter of the label following the @ character, the component will become active (the input will be focused, the form of a multiform will be the active one, etc.)- Parameters:
s- The label of the component- Returns:
- The label without the @ character, or
nullif the label was null
-
calcShortcut
Returns the character that defines the shortcut for the label (the one that follows the @ character, if present). SeecalcLabel(String)- Parameters:
s- The label of the component- Returns:
- The character that defines the shortcut, or
nullif not present
-
calcKeyLabel
Returns the label in which the shortcut letter (the one that follows the @ character, seecalcLabel(String)) is underlined to emphasize it and highlight to the user which letter is to be pressed to use the shortcut- Parameters:
s- The label of the component- Returns:
- The label with the shortcut letter emphasized
-
getHtmlLabel
public org.apache.ecs.html.Label getHtmlLabel(String label, boolean notnull, boolean nowrap, boolean basic, String forx) Returns theLabelelement, i.e. the html code of the component's label- Parameters:
label- The string that defines the labelnotnull-trueif the component needs to be valued when you make a submit action, false otherwise. When this attribute istruea particular class of style is assigned to the label to show the user that the component must have a value before the submitnowrap-trueif the label cannot be wrapped,falseotherwisebasic-truefor legacy visualization mode,false(default) otherwiseforx- The name of the Component to which the label is associated- Returns:
- The
Labelelement, ornullif the label passed as parameter wasnullor an empty string
-
getHtmlLabel
public org.apache.ecs.html.Label getHtmlLabel(String label, boolean notnull, boolean nowrap, boolean basic, String forx, String className) Returns theLabelelement, i.e. the html code of the component's label- Parameters:
label- The string that defines the labelnotnull-trueif the component needs to be valued when you make a submit action, false otherwise. When this attribute istruea particular class of style is assigned to the label to show the user that the component must have a value before the submitnowrap-trueif the label cannot be wrapped,falseotherwisebasic-truefor legacy visualization mode,false(default) otherwiseforx- The name of the Component to which the label is associatedclassName- Css style class to add to the label element- Returns:
- The
Labelelement, ornullif the label passed as parameter wasnullor an empty string
-
isLabelInLine
protected boolean isLabelInLine()Gets the real labelInLine value to apply.
This method returns the value of the attribute based on if there is a user customization on the labelInLine attribute. If there is no customization returns the default value.- Returns:
- the real labelInLine value to apply
-
setLABELINLINE
Defines if the label of the component can be wrapped or not- Parameters:
s-trueif the label can be wrapped,falseotherwise
-
setICON
Sets the icon associated to the component- Parameters:
icon- It can be the icon's path, the thematic icon's name or ansvgelement
-
setREGISTRYNAME
Sets the string used to retrieve the component instance within the Java classes. This reference must be unique within every XML file that user has navigated before to reach the page related to this XML. So pay attention to not specify generic values (something like "form", "field", etc.) in order to avoid possible conflicts and unwanted behaviours- Parameters:
s- The string used to retrieve the component instance
-
getRegistryName
Gets the component's registry name if component has it.- Returns:
- The component's registry name if exists, null otherwise.
-
getIcon
Returns theIconHDassociated to the component- Returns:
- The icon associated to the component
-
getIdentity
Returns theIdentityassociated to the component- Specified by:
getIdentityin interfaceIdentified- Returns:
- The Identity of the user currently logged in the application
-
setIdentity
Sets theIdentityto the component- Specified by:
setIdentityin interfaceIdentified- Parameters:
identity- The Identity that must be associated to the component
-
getParentComponent
Returns the parent Component- Returns:
- The parent Component
-
getValuesContainer
Returns theValuesContainerof the Componentt. If the Component is an instance of ValuesContainer itself, like for example aForm, then the pointer to itself will be returned- Returns:
- The
ValuesContainer
-
setValuesContainer
Sets theValuesContainerfor the Component.- Parameters:
valuesContainer- TheValuesContainerto set
-
getEntityContainer
Returns theEntityContainerof the Componentt. If the Component is an instance of EntityContainer itself, like for example aForm, then the pointer to itself will be returned- Returns:
- The
EntityContainer
-
componentIterator
Returns anIteratorover the collection of the childrens of the Component- Returns:
- The Iterator used to iterate over the childrens of the Component
-
getChildrenComponents
Returns the children components of the Component- Returns:
- The
ArrayListof the childrens of the Component
-
componentSize
public int componentSize()Returns the size, i.e. the number of childrens of the Component- Returns:
- The number of childrens of the Component
-
setNAME
Sets the name of the component.
During the submit actions, theInputobjects depends on the value of this attribute to add the parameter at the form values; for this reason, this attribute is mandatory for everyInputcomponent- Parameters:
s- The name of the component, used for the submit actions
-
getNAME
Returns the name of the component (seesetNAME(String))- Returns:
- The name of the component
-
setLAYOUTNAME
Sets thelayoutName, the name used for layout purpose such the dragging and dropping of the column for repositioning. To make the repositioning mechanism work, the names of the columns must be all different; if there are cases of homonymy, thelayoutNamecan be introduced, so that the columns can be differentiated.- Parameters:
stateName- The name used for layout purpose
-
getLayoutName
Returns thelayoutName, the name used for layout purpose such the dragging and dropping of the column for repositioning- Returns:
- The string that corresponds to the
layoutNameof the column
-
setLABEL
Sets the label of the component; the label position depends on the type of the component, and on the positioning grid used. Usually it contains a short description that helps the user to understand the meaning of the component (what is the use of the component, what the component contains, etc.)The label can contain the @ character, used to define the shortcut to the component; by simultaneously pressing ALT and the letter of the label following the @ character, the component will become active (the input will be focused, the form of a multiform will be the active one, etc.)
Using this method the label will be translated by the
Teacher- Parameters:
s- The string that defines the label of the component
-
setLabel
Sets the label of the component; the label position depends on the type of the component, and on the positioning grid used. Usually it contains a short description that helps the user to understand the meaning of the component (what is the use of the component, what the component contains, etc.).
Using this method the label will not be translated.- Parameters:
s- The string that defines the label of the component
-
getLABEL
Returns the label of the component- Returns:
- The string that defines the label of the component
-
getKEYLABEL
Returns the key label of the component- Returns:
- The string that defines the label of the component
-
getSHORTCUT
Returns the shortcut of the component i.e. the character that follows the @ character. By simultaneously pressing ALT and the letter of the label following the @ character, the component will become active (the input will be focused, the form of a multiform will be the active one, etc.)- Returns:
- The character used as the shortcut for the component
-
containerIterator
Returns anIteratorover the collection of children containers of the Component- Returns:
- The iterator over the children containers
-
getChildrenContainers
Returns the collection of children containers of the Component- Returns:
- The
ArrayListof children containers
-
getParentContainer
Returns the parentContainerof the Component- Returns:
- The parent
Container
-
getWindow
Returns theWindowthat contains the Component- Returns:
- The
Windowthat contains the Component
-
getHtml
Abstract method that must be extended and returns the html code of the Component- Parameters:
es- TheEntitySetto which the element belongs- Returns:
- The html of the Component
-
getPublishedChildrenList
Returns the published childs. Those that are not published are not even searched to be synchronized via Ajax- Returns:
- The
Listof published childs
-
buildSetupScript
Every component can add a script to the StringBuilder, script executed when the component is created.- Parameters:
sb- The StringBuilder on which we want to add the script
-
buildDisplayScript
Every component can add a script to the StringBuilder, script executed when the component is displayed.- Parameters:
sb- The StringBuilder on which we want to add the script
-
fillSetupScript
Deprecated.UsebuildSetupScript(). Remains only for backward compatibility with legacy objects created to work both on geocall 4 and following versions- Parameters:
sb-buildSetupScript().
-
setup
protected void setup()Setup the Component -
connect
protected void connect() -
onInit
Initilizes the Component and all its childs- Parameters:
parent- The parentContainerof the Component
-
initChilds
Call theonInit(Container)method of all the childrens (seeUINode.getChildren()) of the Component- Parameters:
parent- The component of which we want to initialize the children
-
tabIndexer
public int tabIndexer(int from) -
getTabIndex
public final int getTabIndex() -
getTeacher
Returns theTeacher, the object that manages the translations- Returns:
- The
Teacherthat manages the translations
-
getEntityName
Returns the entity that will be used to validate the extended field. If this component is not an EDM component, no entity will be set- Returns:
- The entity that will be used to validate the extended field, If this component is not an EDM component, null.
-
setEntityName
Sets the entity that will be used to validate the extended field. If this component is not an EDM component, no entity must be set- Parameters:
entity- The entity to set.
-
ajaxQuery
Method that must be extended to implements the Ajax interaction request / response logic for the Component- Parameters:
request-HttpServletRequestresponse-HttpServletResponse
-
changed
public void changed()Defines the morphing of the component that occurs when there is an Ajax interaction -
createAjaxFrame
public org.apache.ecs.ConcreteElement createAjaxFrame() -
appendAttribute
public static void appendAttribute(org.apache.ecs.ElementAttributes element, String attribute, String value) Utility method that appends the desired value to an attribute of the element. If the attribute is not already present for the element, then it is added and set up with the value passed as a parameter- Parameters:
element- The elementattribute- The attribute to which add the value (if the attribute is not present, it will be added)value- The value to append to the attribute
-
adapt
-
setTooltip
Sets the tooltip attribute on element.- Parameters:
el- The Element on which add the attribute tooltipcontent- The content of the tooltip attribute.
-
clearConfiguredProperties
public void clearConfiguredProperties()Clear the Collection of configured UI properties.
This collection contains all the user UI properties customization applied to the component. -
canBeConfigured
public boolean canBeConfigured()Gets if the component is allowed to be configured or not.
A configurable component is a component for which user can edit its UI properties into the configurability panels (Form and Tables).
A component is configurable if it has the @Component.Configurableannotation and if its layout name or its name are not null.- Returns:
trueif the component is allowed to be configured,falseotherwise.
-
buildSetupScript().