Portal
(part of package 'Servoy Core') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
A Servoy Extra Component that displays a portal for viewing and editing related foundset records.
This is a reference page; many components have detailed usage guides here.
Properties
background
The background color for the portal component. Type: Color
borderType
The type of border applied to the portal. Type: Border
editable
Flag indicating whether the portal is editable. Type: Boolean Default Value: true
enabled
Flag indicating whether the portal is enabled for user interaction. Type: Enabled Default Value: true
foreground
The foreground color for the portal component. Type: Color
headerHeight
The height of the portal header in pixels. Type: Number Default Value: 32
initialSort
The initial sort order for the portal, specified as a string. Type: String
intercellSpacing
The spacing between cells in the portal. Type: Dimension
location
The location of the portal on the form. Type: Point
multiLine
Flag indicating whether the portal supports multiple lines. Type: Boolean
readOnlyMode
The read-only mode setting for the portal. Type: Protected Default Value: null
relatedFoundset
The foundset related to the portal. Type: JSFoundset
reorderable
Flag indicating whether the portal supports reordering of records. Type: Boolean
resizable
Flag indicating whether the portal is resizable. Type: Boolean
resizeble
(Deprecated) Duplicate property for resizable. Type: Boolean
rowBGColorCalculation
Calculation used to determine the row background color. Type: String
rowHeight
The height of each row in the portal. Type: Number
scrollbars
Configuration for scrollbars in the portal. Type: Scrollbars
showHorizontalLines
Flag indicating whether horizontal grid lines are shown. Type: Boolean
showVerticalLines
Flag indicating whether vertical grid lines are shown. Type: Boolean
sortable
Flag indicating whether the portal is sortable. Type: Boolean
styleClass
CSS style classes applied to the portal. Type: String
tabSeq
The tab sequence order for keyboard navigation. Type: Tabseq
transparent
Flag indicating whether the portal background is transparent. Type: Boolean
visible
Flag indicating whether the portal is visible. Type: Visible
Events
onDragEndMethodID(event)
Called when a drag operation ends on the portal.
Parameters:
{JSDNDEvent} event The event object associated with the drag end.
onDragMethodID(event)
Called during a drag operation over the portal.
Parameters:
{JSDNDEvent} event The event object associated with the drag.
Returns: {Number}
onDragOverMethodID(event)
Called when an element is dragged over the portal.
Parameters:
{JSDNDEvent} event The event object associated with the drag over.
Returns: {Boolean}
onDropMethodID(event)
Called when an element is dropped onto the portal.
Parameters:
{JSDNDEvent} event The event object associated with the drop.
Returns: {Boolean}
API
deleteRecord()
Deletes the currently selected record from the portal's foundset.
duplicateRecord(addOnTop)
Duplicates the currently selected record in the portal's foundset.
Parameters:
{Boolean} [addOnTop] Whether to add the duplicated record at the top of the foundset.
getFormName()
Retrieves the name of the form that the portal is associated with.
Returns: String The name of the form containing the portal.
getHeight()
Retrieves the height of the portal component.
Returns: Number The height of the portal in pixels.
getLocationX()
Retrieves the X-coordinate (horizontal position) of the portal component.
Returns: Number The X-coordinate of the portal in pixels.
getLocationY()
Retrieves the Y-coordinate (vertical position) of the portal component.
Returns: Number The Y-coordinate of the portal in pixels.
getMaxRecordIndex()
Retrieves the maximum record index available in the portal's foundset.
Returns: Number The total number of records in the related foundset.
getScrollX()
Retrieves the current horizontal scroll position of the portal.
Returns: Number The horizontal scroll position in pixels. Always returns 0, as scrolling is not implemented for web.
getScrollY()
Retrieves the current vertical scroll position of the portal.
Returns: Number The vertical scroll position in pixels. Always returns 0, as scrolling is not implemented for web.
getSelectedIndex()
Retrieves the index of the currently selected record in the portal's foundset.
Returns: Number The 1-based index of the selected record, or -1 if no record is selected.
getSortColumns()
Retrieves the sorting columns applied to the portal's related foundset.
Returns: String A string representing the current sort order of the foundset, formatted as a comma-separated list of column names followed by sort directions (ASC or DESC).
getWidth()
Retrieves the width of the portal component.
Returns: Number The width of the portal in pixels.
newRecord(addOnTop)
Creates a new record in the portal's foundset.
Parameters:
{Boolean} [addOnTop] Whether to add the new record at the top of the foundset.
setScroll(x,y)
Sets the scroll position of the portal.
Parameters:
setSelectedIndex(index)
Sets the selected record index in the portal's foundset.
Parameters:
{Number} index The 1-based index of the record to be selected.
Last updated
Was this helpful?