Child pages
  • JSWebComponent

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListNGClient

servoy sReturnTypes2100%height: 30px;2ExtendssWordListBLOCK

servoy sSummary12%30%58%height: 30px;3Property SummaryEnables a component to stick to a specific side of form and/or to grow or shrink when a window is resized.CSS position is a replacement for anchoring system making it more intuitive to place a component.The enable state of the component, default true.The Z index of this component.The height in pixels of the component.The name of the component.The webcomponent type (name from the spec).The visible property of the component, default true.The width in pixels of the component.The x coordinate of the component on the form.The y coordinate of the component on the form.

servoy sSummary12%30%58%height: 30px;3Methods SummaryGet the value of an attribute of the element.Returns the attribute names of an element.Get a design-time property of an element.Get the design-time properties of an element.Returns the name of the form.Returns the JSMethod handler with the given name.Get the design-time value of the given property.Get the list of property names this component supports.Returns the UUID of this component.Returns whatever the design-time value of the given property was set.Set a design-time property of an element.Remove the attribute of an element.Clear a design-time property of an element.voidSimilar to resetJSONProperty but for handlers.voidReset the design-time value of the given property.voidSet the attribute value of an element.voidSet the JSMethod handler for the given handler name.voidSet the design-time value for the given property.

propertyservoy sDetail2100%height:30px2Property Detailsanchorsname

anchors

dessIndent
Enables a component to stick to a specific side of form and/or to 
grow or shrink when a window is resized. 

If opposite anchors are activated then the component with grow or 
shrink with the window. For example if Top and Bottom are activated, 
then the component will grow/shrink when the window is vertically 
resized. If Left and Right are activated then the component
will grow/shrink when the window is horizontally resized. 

If opposite anchors are not activated, then the component will 
keep a constant distance from the sides of the window which
correspond to the activated anchors.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowcssPositionname

cssPosition

dessIndent
CSS position is a replacement for anchoring system making it more intuitive to place a component.
CSS position should be set on form, an absolute position form can either work with anchoring or with css position.
This is only working in NGClient.
ret

Returns

sIndent
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
enabledname

enabled

dessIndent
The enable state of the component, default true.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
formIndexname

formIndex

dessIndent
The Z index of this component. If two components overlap,
then the component with higher Z index is displayed above
the component with lower Z index.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
heightname

height

dessIndent
The height in pixels of the component.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
namename

name

dessIndent
The name of the component. Through this name it can also accessed in methods.
Must be a valid javascript name. (no - in the name or start with number)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
typeNamename

typeName

dessIndent
The webcomponent type (name from the spec).
ret

Returns

sIndent
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
visiblename

visible

dessIndent
The visible property of the component, default true.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
widthname

width

dessIndent
The width in pixels of the component.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
xname

x

dessIndent
The x coordinate of the component on the form.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
yname

y

dessIndent
The y coordinate of the component on the form.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsgetAttributename

getAttribute(name)

dessIndent
Get the value of an attribute of the element.
prs

Parameters

sIndentnamethe name of the attribute
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowgetAttributesname

getAttributes()

dessIndent
Returns the attribute names of an element.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDesignTimePropertyname

getDesignTimeProperty(key)

dessIndent
Get a design-time property of an element.
prs

Parameters

sIndentkeythe name of the property
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDesignTimePropertyNamesname

getDesignTimePropertyNames()

dessIndent
Get the design-time properties of an element.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getFormNamename

getFormName()

dessIndent
Returns the name of the form. (may be empty string as well)
ret

Returns

sIndent The name of the form.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getHandlername

getHandler(handlerName)

dessIndent
Returns the JSMethod handler with the given name.
prs

Parameters

sIndenthandlerNamethe name of the handler to get
ret

Returns

sIndent
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
getJSONPropertyname

getJSONProperty(propertyName)

dessIndent
Get the design-time value of the given property. If the value was never set and
the component has default value for the give property, that value will be returned.
To check if the value was set, use isJSONPropertySet.
prs

Parameters

sIndentpropertyNamethe name of the property to get
ret

Returns

sIndent
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
getJSONPropertyNamesname

getJSONPropertyNames(includeAll)

dessIndent
Get the list of property names this component supports.
It can return all properties specified in spec file or only the properties that are set in json.
prs

Parameters

sIndentincludeAllwhether to return all properties from specification file or only the ones that are set in json
ret

Returns

sIndent
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUUIDname

getUUID()

dessIndent
Returns the UUID of this component.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isJSONPropertySetname

isJSONPropertySet(propertyName)

dessIndent
Returns whatever the design-time value of the given property was set.
prs

Parameters

sIndentpropertyNamethe name of the property to check
ret

Returns

sIndent
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
putDesignTimePropertyname

putDesignTimeProperty(key, value)

dessIndent
Set a design-time property of an element.
prs

Parameters

sIndentkeythe name of the propertyvaluethe value to store
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeAttributename

removeAttribute(name)

dessIndent
Remove the attribute of an element.
prs

Parameters

sIndentnamethe name of the attribute
ret

Returns

sIndent the deleted attribute value
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeDesignTimePropertyname

removeDesignTimeProperty(key)

dessIndent
Clear a design-time property of an element.
prs

Parameters

sIndentkeythe name of the property
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
resetHandlername

resetHandler(handlerName)

dessIndent
Similar to resetJSONProperty but for handlers.
prs

Parameters

sIndenthandlerNamethe name of the handler to reset
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
resetJSONPropertyname

resetJSONProperty(propertyName)

dessIndent
Reset the design-time value of the given property.
This makes it as if it was never set. It can be useful when working with form inheritance.
prs

Parameters

sIndentpropertyNamethe name of the property to reset
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
setAttributename

setAttribute(name, value)

dessIndent
Set the attribute value of an element.
prs

Parameters

sIndentnamethe name of the attributevaluethe value of the attribute
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setHandlername

setHandler(handlerName, method)

dessIndent
Set the JSMethod handler for the given handler name. The handlerName is checked for existence in the component spec file, if the component does not declare this handler, an error is thrown.
If the handler is already set, it will be replaced with the new JSMethod.
prs

Parameters

sIndenthandlerNamethe name of the handler to getmethodthe JSMethod to attach to the handler (can be also JSMethod that has arguments)
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
setJSONPropertyname

setJSONProperty(propertyName, value)

dessIndent
Set the design-time value for the given property. For primitive property types you can just set the value.
For more complex property types you can set a JSON value similar to what would be generated in the .frm file if you would design what you need using editor/properties view.
Some property types can be assigned values in the runtime accepted format (for example border, font typed properties have a string representation at runtime and here as well).
prs

Parameters

sIndentpropertyNamethe name of the property to setvaluethe new value of the property
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow