Helma Logo
main list history

Version 6 by hannes on 29. September 2009, 09:59

14    title = "Hello, World!"</tt>

Version 5 by hannes on 29. September 2009, 09:58

16Accessing the properties e.g. from `root/actions.js`:application code:

Version 4 by hannes on 21. September 2009, 23:48

1<h4>Description</h4>This file is located in an application's code repository (e.g. `apps/myApp/` or `apps/myApp/code/`, depending on your setup). A wide variety of properties can be defined here. Generally, any imaginable name can be used as a property and assigned a string value the way
3This file is located in an application's code repository (e.g. <tt>apps/myApp/</tt> or <tt>apps/myApp/code/</tt>, depending on your setup). A wide variety of properties can be defined here. Generally,propertyName = any imaginable name can be used as a property and assigned a string value the waypropertyValue
5<tt><i>propertyName = propertyValue</i></tt>Properties defined in such a way can be evaluated from inside Helma's scripting environment by using the `getProperty()` function.
7Properties defined in such a way Several application specific settings can be evaluated from inside Helma's scripting environment by using controlled trough pre-defined properties. See the <tt>getProperty()</tt> function[Server and Application Properties] for a complete overview.
9Several application specific settings Many of those pre-defined properties also can be controlled trough pre-defined propertiesdefined server-wide in [server.properties]. See the *server and application properties list|Server and Application Properties* for a complete overviewHowever, any property that is set there will be overwritten by an appropriate setting in [app.properties].
11Many of those pre-defined properties also can be defined server-wide in <tt>*server.properties*</tt>. However, any property that is set there will be overwritten by an appropriate setting in <tt>app.properties</tt>.
13<h4>Example</h4>    # Setting some properties:
14    backgroundColor = #3333ff
15    title = "Hello, World!"</tt>
15<tt># Setting some properties:Accessing the properties e.g. from `root/actions.js`:
16backgroundColor = #3333ff
17title = "Hello, World!"</tt>
17Accessing the properties e.g. from <tt>root/main.hac</tt>:  var bgColor = getProperty("backgroundColor");
18<tt>var bgColor = getProperty("backgroundColor");  res.write(bgColor);
19res.write(bgColor);    // #3333ff
20<i>#3333ff</i>
19    var title = getProperty("title");
20    res.write(title);
21<i>Hello    // "Hello, World!</i></tt>World!"
22

Version 3 by hannes on 19. February 2009, 12:13

1<small><b>Description</b></small><h4>Description</h4>
2
12<small><b>Example</b></small><h4>Example</h4>
13

Version 2 by zumbrunn on 18. February 2009, 21:19

8Several application specific settings can be controlled trough pre-defined properties. See the *server and application properties list|wiki/Server list|Server and Application Properties* for a complete overview.

Version 1 by zumbrunn on 18. February 2009, 21:12

1<small><b>Description</b></small>
2This file is located in an application's code repository (e.g. <tt>apps/myApp/</tt> or <tt>apps/myApp/code/</tt>, depending on your setup). A wide variety of properties can be defined here. Generally, any imaginable name can be used as a property and assigned a string value the way
3<tt><i>propertyName = propertyValue</i></tt>
4
5Properties defined in such a way can be evaluated from inside Helma's scripting environment by using the <tt>getProperty()</tt> function.
6
7Several application specific settings can be controlled trough pre-defined properties. See the *server and application properties list|wiki/Server and Application Properties* for a complete overview.
8
9Many of those pre-defined properties also can be defined server-wide in <tt>*server.properties*</tt>. However, any property that is set there will be overwritten by an appropriate setting in <tt>app.properties</tt>.
10
11<small><b>Example</b></small>
12<tt># Setting some properties:
13backgroundColor = #3333ff
14title = "Hello, World!"</tt>
15
16Accessing the properties e.g. from <tt>root/main.hac</tt>:
17<tt>var bgColor = getProperty("backgroundColor");
18res.write(bgColor);
19<i>#3333ff</i>
20
21var title = getProperty("title");
22res.write(title);
23<i>Hello, World!</i></tt>