Form, Form Object, and Item List Methods
The
AppEventHandlerList
,
Declaration
,
FormList
,
FormObjectList
, and
ItemList
classes have the following methods:
Name
Syntax
Purpose
get
Form get(int index)
FormObject get(int index)
Item get(int index)
DataSource get(int index)
AppEventHandler get(int index)
Returns the object at a certain index.
get
Form get(String name)
FormObject get(String name)
Item get(String name)
DataSource get(String name)
AppEventHandler get(String name)
Returns the object with a given name.
index
int index(String name)
Returns the 0-based position of the object with a given name in the list.
names
String[] names()
Returns an array of names for all objects in the list.
size
int size()
Returns the number of objects in the list.
Additionally the FormList class has the following methods:
Name
Syntax
Purpose
hasProperty
boolean hasProperty(String name)
Returns true if there is a modifiable property with the specified name.
It is also possible to use a list in an enhanced
for
loop to operate on all objects in the list.
In the following example, the background color is set to red in all forms, by looping over all forms:
for (Form f : app.form()) { // app.form() is of type FormList
f.set("background", "red");
}