use of com.servoy.j2db.scripting.DefaultScope in project servoy-client by Servoy.
the class BasicFormController method getElements.
public IRuntimeComponent[] getElements() {
Object elementScope = formScope == null ? null : formScope.get("elements");
if (elementScope instanceof DefaultScope) {
Object[] values = ((DefaultScope) elementScope).getValues();
List<IRuntimeComponent> elements = new ArrayList<IRuntimeComponent>(values.length);
for (Object value : values) {
if (value instanceof Wrapper) {
value = ((Wrapper) value).unwrap();
}
if (value instanceof IRuntimeComponent) {
elements.add((IRuntimeComponent) value);
}
}
return elements.toArray(new IRuntimeComponent[elements.size()]);
}
return new IRuntimeComponent[0];
}
Aggregations