Home > Class Reference > ENSLIB namespace > %ZEN.Component.repeatingGroup
Private  Storage   

%ZEN.Component.repeatingGroup


class %ZEN.Component.repeatingGroup extends group, querySource

A specialized group that repeats its contents based on run-time data.
A repeating group executes a query and, for each row of the results, creates HTML for all of the members of the group. For example:

<repeatingGroup sql="SELECT Name FROM Sample.Person">
<button caption="Press" onclick="alert('#(%query.Name)#');"/>
</repeatingGroup>
Each row within the repeating group is referred to as a tuple. For each tuple, the repeating group renders HTML for each of its child components. Note that only one object is created for each child of the repeating group but there are multiple HTML renderings (one per tuple) for each child. The rendered HTML incorporates the current tuple number into the id values used to identify HTML elements to keep track of them.
Applications should keep use of repeatingGroups reasonably simple. Repeating groups within repeating groups are not supported.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 4


Summary


Properties
%condition %import %includeFiles %page
%resource OnCreateResultSet OnExecuteResultSet align
aux cellAlign cellSize cellStyle
cellVAlign children columnName composite
containerStyle countRows disabled dragEnabled
dropEnabled enclosingClass enclosingStyle error
groupByClause groupClass groupStyle height
hidden hint hintClass hintStyle
id index label labelClass
labelDisabledClass labelPosition labelStyle layout
maxRows name onafterdrag onbeforedrag
onclick onclickitem ondrag ondrop
onhide onrefresh onshow onupdate
orderByClause parameters parent queryClass
queryName selectedIndex showLabel slice
sql tableName title tuple
valign visible whereClause width
window

Methods
%AddChild %AddChildAfter %AddChildBefore %AddToSaveSet
%Attr %BindExport %ClassIsLatestVersion %ClassName
%ConstructClone %CreateResultSet %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %DrawComponentHTML %DrawHTML %DrawJSStrings
%EnclosingDivId %Eval %EvalC %Extends
%ForceClientRender %GetChildIndex %GetEventHandlers %GetParameter
%GetXMLName %IsA %IsModified %MakeId
%New %NormalizeObject %ObjectModified %OnAddToPageAfter
%OnAddToPageBefore %OnCreateResultSet %OnDrawEnclosingDiv %OnDrawObjectProperties
%OnExecuteResultSet %OnMutateChildren %OnObjectSynch %OnZENDeserialize
%OriginalNamespace %PackageName %QuoteValue %QuoteValueL10N
%RemoveChild %RemoveChildren %RemoveFromSaveSet %Self
%SerializeObject %SetModified %ValidateObject XMLDTD
XMLExport XMLExportToStream XMLExportToString XMLNew
XMLSchema XMLSchemaNamespace XMLSchemaType addChild
addChildAfter addChildBefore childrenMutated dragFinishHandler
dragHandler dragNotifyHandler dragStartHandler dropHandler
dropStartHandler exposeComponent findElement fireOnUpdateEvent
getChildIndex getEnclosingDiv getHidden getHintElement
getLabelElement getProperty getSettings getType
invokeSuper isOfType itemClickHandler makeId
onCreate onDelete onDisplayHandler onEndModalHandler
onPopupAction onRefreshContents onSerialize onStartModalHandler
ondisabledHandler onloadHandler onunloadHandler onupdateHandler
refreshContents removeChild render renderContents
renderSVG selectItem setHidden setOverlayMode
setProperty setPropertyAll startProgressBar stopProgressBar


Properties


• property onclickitem as %ZEN.Datatype.eventHandler;
onclickitem event handler: If defined, this event is fired when the user clicks on an item within the repeating group.
• property parameters as list of %ZEN.Auxiliary.parameter(XMLNAME="parameter",XMLPROJECTION="ELEMENT");
User-defined list of parameters. These values are passed on to the user callback function that provides the query for this table.
• property selectedIndex as %ZEN.Datatype.integer [ InitialExpression = -1 ];
Indicates which member (0-based) of this repeating group is selected, if any.

Methods


• method %DrawHTML()
Draw contents of the group.
• method itemClickHandler(tuple) [ Language = javascript ]
User has clicked on a member of this repeating group. tuple is 0-based.
• method selectItem(tuple) [ Language = javascript ]
Select a member of this repeating group. tuple specifies which member (0-based).
• method setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.