Package com.ebasetech.xi.api
Interface Projects
- All Superinterfaces:
java.lang.Iterable<Project>
public interface Projects extends java.lang.Iterable<Project>
The
projects
interface acts as a parent object for all projects within the workspace.
Individual projects are accessed using their project name.
When the name is not a valid Java identifier e.g. it begins with a numeric or contains a space, the project can only be
accessed using the getProject(String)
method.
All included projects can be iterated using the following code, pages are presented in the same order as they appear in the designer:
for ( var project in Iterator(projects.iterator()) ) { log(project.elementName); }Examples:
var p1 = projects.myProject; var myProj = projects.getProject("myProject");
- Since:
- V5.13
-
Method Summary
Modifier and Type Method Description Project
getProject(java.lang.String projectName)
Returns theProject
with nameprojectName
.void
setTheme(java.lang.String theme)
Changes the Theme for all the Projects in the Workspace.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getProject
Returns theProject
with nameprojectName
.- Since:
- V5.13
-
setTheme
void setTheme(java.lang.String theme)Changes the Theme for all the Projects in the Workspace. This will change all the forms set to use the Project's Theme to the one at the specified path.The path should be relative to the root of the Project or one of its dependent projects. It must start with a forward slash as a path separator.
The new Theme must have the same Framework and collection of Property Sets as the current Theme otherwise the Form may not look as expected.
Important:
project.setTheme(...)
must be on the last line of a script. After the setTheme function call is executed, the next script configured in the server event will be executed.For further information see:
JavaScript example:
projects.setTheme("/themes/myTheme");
- Parameters:
theme
- the path of the new theme to be applied- Since:
- V5.13
-