Collapse
(part of package 'Servoy Extra Components') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
This is a reference page; many components have detailed usage guides here.
Properties
accordionMode
Type: boolean Default Value: true
collapsibles
Type: collapsible[]
expandedIndices
Type: int[]
styleClass
Type: styleclass
tabSeq
Type: tabseq
visible
Type: visible
Events
onCardClicked(event,card,collapsible,cardIndex,collapsibleIndex,dataTarget)
Parameters:
onCollapsibleHidden(event,collapsible,collapsibleIndex)
Parameters:
{JSEvent} event
{collapsible} collapsible
{int} collapsibleIndex
onCollapsibleShown(event,collapsible,collapsibleIndex)
Parameters:
{JSEvent} event
{collapsible} collapsible
{int} collapsibleIndex
onHeaderClicked(event,collapsible,collapsibleIndex,dataTarget)
@return {boolean}
Parameters:
{JSEvent} event
{collapsible} collapsible
{int} collapsibleIndex
{string} dataTarget
Returns: {boolean}
onHeaderDoubleClicked(event,collapsible,collapsibleIndex,dataTarget)
@return {boolean}
Parameters:
{JSEvent} event
{collapsible} collapsible
{int} collapsibleIndex
{string} dataTarget
Returns: {boolean}
API
addCollapsible(collapsible,index)
Adds a new collapsible to the list of collapsibles of this Collapse component
Parameters:
{collapsible} collapsible
{int} [index] The index to insert the new collapsible at
createCard(textOrHtml,cardId,styleClass)
Creates a new card that can be added to any collapsible's cards array
Parameters:
Returns: card
createCollapsible(headerHtml,collapsibleId)
Creates a new collapsible that can be added to the Collapse component using addCollapsible
/ setCollapsibles
Parameters:
Returns: collapsible
getCard(index,collapsibleIndex)
Returns the card with the given index
Parameters:
Returns: card The card or null when not found
getCardById(cardId)
Returns the card with the given ID
Parameters:
{string} cardId CardId
Returns: card The card or null when not found
getCollapsible(index)
Returns the collapsible with the given index (0 based)
Parameters:
{int} index If not given, the first collapsible is used
Returns: collapsible The card or null when not found
getCollapsibleById(collapsibleId)
Returns the collapsible with the given ID
Parameters:
{string} collapsibleId If not given, the first collapsible is used
Returns: collapsible The card or null when not found
hide(index)
Hides the collapsible at the given index (or the first/only one, if no index is given)
Parameters:
{int} [index] The index of the collapsible to hide
isCollapsed(index)
Returns whether the collapsible at the given index (or the first one if no index is provided) is collapsed
Parameters:
{int} [index]
removeAllCollapsibles()
Removes all collapsibles. It will also hide the forms that are showing on any of the collpsibles.
If one of the collapsibles has a form showing that denies hide, the removeAllCollapsibles operation will stop and return false. In this case, all collapsibles that had forms and were hidden so far will still be in the collapsible array but they will be 'collapsed'.
Returns: boolean True if all collapsibles were removed successfully; false if one of the collapsibles had a form which denied hide.
removeCollapsibleAt(index)
Remove the collapsible with the given index (the index is 0 based) or the first collapsible if no collapsibleIndex is given. If the collapsible was showing a form, it will hide that form as well.
Parameters:
{int} index The index of the collapsible to remove; if not given, the first collapsible is used
Returns: boolean True if the collapsible at the give index (or 0 if not given) was removed; false if collapsibleIndex is out of bounds or if the form shown by this collapsible denied hide.
removeCollapsibleById(collapsibleId)
Removes the collapsible with the given ID. If the collapsible was showing a form, it will hide that form as well.
Parameters:
{string} collapsibleId CollapsibleId the id of the collapsible to remove.
Returns: boolean True if the collapsible with the given id was removed; false if collapsibleId is not given, not found or if the form shown by this collapsible denied hide.
setCollapsibles(collapsibles)
Sets all collapsibles of this Collapse component
Parameters:
{collapsible[]} collapsibles Collapsibles
show(index)
Shows the collapsible at the given index (or the first/only one, if no index is given)
Parameters:
{int} [index] The index of the collapsible to show
toggle(index)
Toggles the collapsible at the given index (or the first/only one, if no index is given)
Parameters:
{int} [index] The index of the collapsible to toggle
Types
card
scripting type: CustomType<servoyextra-collapse.card>
cardId
Type: string
contentHtml
Type: tagstring
form
Type: form
Default Value: ""
maxResponsiveHeight
Type: int
Default Value: null
minResponsiveHeight
Type: int
Default Value: null
styleClass
Type: styleclass
collapsible
scripting type: CustomType<servoyextra-collapse.collapsible>
bodyStyleClass
Type: styleclass
cards
Type: card[]
collapsedIconName
Type: string
Default Value: "fa fa-2x fa-angle-down"
collapsibleHtml
Type: tagstring
Default Value: ""
collapsibleId
Type: string
expandedIconName
Type: string
Default Value: "fa fa-2x fa-angle-up"
form
Type: form
Default Value: ""
headerHtml
Type: tagstring
Default Value: ""
headerStyleClass
Type: styleclass
Default Value: ""
iconLocation
Type: string
Default Value: "RIGHT"
maxResponsiveHeight
Type: int
Default Value: null
minResponsiveHeight
Type: int
Default Value: null
relationName
Type: relation
styleClass
Type: styleclass
Default Value: ""
Last updated