Search

Module: Editor

Version: 2.2.1 +

User: Developer

Object Type: Output Object

Parent of:

- WebPanel

Child of:

- WebPage

- WebPanel

Description

A WebListBox object provides output on a website. With the WebListBox you can display information in a table structure on your website. For example a list of participants.

Within the WebListBox object, you first have to add a WebPanel. It is only possible to have one WebPanel per WebListBox object. Within the WebPanel, you can then add the list item(s) you want to display.

Properties

DebugLogMode (from version 4.1)

Indicates the level of detail of debug information that is logged during runtime of the website to the trace, a logfile, a database etc. The possible values are:

  • None: no debug information is logged
  • Simple: only basic information is given
  • Extended: in addition to the information in the Simple mode the values of all the properties of the object are shown

IsPublic

Possible values are 'True' or 'False'. If the value is 'False', then the object can only be used within the document where it is created. If the value is 'True', then also from other Futurama documents can be referred to this object. This means that changes in the object also affect the document in which is referred to this object. If the value is 'True' and you attempt to move or delete the object, a warning will be given. To limit these warnings to a minimum it is recommended to set IsPublic to 'True' only when necessary.

RepeatData

In the property RepeatData you should enter the table that the WebListBox should loop through. All elements are subsequently assigned to the UserVariable defined in the RepeatTarget property.
You will often create a range of row numbers for the RepeatData property. By using the RepeatTarget Uservariable that will loop through these row numbers, you can then display the corresponding value out of the table(s) with the information you want to display.

RepeatTarget

This property is used in conjunction with RepeatData. It can only refer to a UserVariable. The RepeatTarget property can be considered as the counter of a loop. During the execution of the loop it subsequently gets assigned all the values in the table defined in the RepeatData property.

Visible

Possible values are 'True' or 'False'. If the value is 'True', the object will be rendered and therefore displayed in your application. If the value is 'False', the object will not be rendered.

XmlName

The name of the object as it is shown in the source of the website. By default the XmlName is equal to the name given in the property (Name) with spaces replaced by underscores, but you are free to change it.

(Name)

The name of the object.

Comment

Here a comment can be entered. For example a short description of the object.

ID

The unique identification number of the object. This number is automatically generated by Futurama on the moment of creation. This number can be used when searching for a certain object in the Find Window.

IsAjaxUpdatePanel

This is an automatic property indicating if the object is referred to as an UpdatePanel. Possible values are 'True' or 'False'.

AlternatingCssClass

When this property is filled, the CssClass for each row of the WebListBox will alternate between CssClass (because it is the CssClass of the WebListBox) and the combination of CssClass and AlternatingCssClass. See the paragraph Rendering for further information.

CssClass

Here the CssClass can be entered. In the stylesheet you can define the style elements that belong to this class.

WebListBoxIndex (Futurama 19.04 +)

Depending on the defined RepeatData of a WebListBox a number of WebPanels are rendered/created. From Futurama 19.04 for each WebPanel a WebListBoxIndex is created. The first WebPanel gets WebListBoxIndex=0, the second WebPanel gets WebListBoxIndex=1, etc. This index can be used in all the Text properties of the Objects that are defined within the WebPanel. This can be used in a Text property by the next syntax: {{WebListBoxIndex}}. For example if you have defined a WebLabel, then you can define in the text property of the WebLabel: This is WebLabel {{WebListBoxIndex}}. The WebLabel that is child of the first WebPanel of the WebListBox will get text value ‘This is WebLabel 0’, the second WebPanel of the WebListBox will get text value ‘This is WebLabel 1’, etc.

The WebListBoxIndex can also be used together with PageData (see the Text Management support page and the WebPage support page). Suppose you have defined a array Texts within the PageData of your WebPage. Then it is possible to dynamically define texts within the WebListBox with the next syntax: {{PageData:Texts[{{WebListBoxIndex}}]}}. For each WebListBoxIndex the corresponding text from the Texts array will be given.

Rendering

A WeblistObject object is rendered as a DIV object. The Webpanel(s) that should be added within the WebListBox object, are rendered as a DIV as well, and as many times as the RepeatData states. When a CssClass is submitted, this class is added as an attribute to the parent webpage. When a AlternatingSccClass is defined as well, the list items will alternately be emtpy or equal to the AlternatingCssClass. First element gets the AlternatingCssClass. See below for an example.

Beware that the rendering of objects depends on the DocType selected for your Futurama Document. The rendering mentioned above is based on the DocType XHTML_1_0. If your using the old DocType HMTL4_Transitional, please consult the Document page for further information.

Example

This example shows the usage of the WebListBox object

Download

Download the Futurama Document WebListBox Example.

Description

  1. Open the XML-document which is contained in the zip-file in the Futurama Editor (Version 4.2.1 or later).
  2. Within the Node 'input', there are two DataTables consisting of the first and last names of a list of participants.
  3. A range is constructed with the same length as both the DataTables.
  4. This range is used in the RepeatData property in the WebListBox.
  5. Within the WeblistBox, a WebPanel is defined. This WebPanel holds two WebLabels.
  6. In these Weblabels, the first and last names of the participants are derived, using the RepeatTarget UserVariable.
  7. When running this 'application' in your browser, you can see that this application will return a list of participants, with both the first and last name.

Related Topics

- Futurama Objects: The Atlas chapter that describes all Futurama objects. See the Output-section for a description of the type of objects this object belongs to.

- WebPanel

Updated: 2019-04-15