When you define elements in the site structure, you can set values for named properties that will only be set for that particular element instance. For example:
<element id="PROPERTIES1" file="element/engine/properties.xml" url="/properties1">
<property name="property1">property1a</property>
<property name="property2">property2a</property>
</element>
<element id="PROPERTIES2" file="element/engine/properties.xml" url="/properties2">
<property name="property1">property1b</property>
<property name="property3">property3b</property>
</element>
where the element is implemented as follows:
public class Properties extends Element
{
public void processElement()
{
print("Property 1 = "+getProperty("property1"));
print("Property 2 = "+getProperty("property2"));
print("Property 3 = "+getProperty("property3"));
}
}
When you visit the "/properties1" URL, the output will be:
and for the "/properties2" URL, the output will be:
This is currently really a "poor-man's" version of IoC where only literal values can be injected. In a later version we are planning to extend this to a much more flexible system.