THank you for taking the time to
pass along this immensely clear beta.
Helena
Ross Gardler wrote:
Helena
Edelson wrote:
Hi,
What is actually reading the forrest.properties data?
I am trying to understand if there is more extendability for the
parameters, for example:
forrest.validate.skinconf.includes=${skinconf-file}
i.e. what in the Forrest engine is parsing and using this or is it
Cocoon?
forrest.properties is a mixture of properties used during the
initialisation of the application and during the actually execution.
The validate properties, like the one you select as an example, are
used by the ANT script that runs Forrest. Others, such as
"project.skin" are made available at runtime via a Cocoon Input Module,
which is configured in the forrest.xconf file.
Taking the question a step further, is it
possible then to define new settings in forrest.properties?
example:
*project.data=""
and if so how might this be referenced in sitemap?
Add your property to forrest.properties. If you want to provide a
default setting add it to FORREST_HOME/main/default.forrest.properties.
Now find the following element in
FORREST_HOME/main/webapp/WEB-INF/xconf/forrest.xconf:
<component-instance name="project"
class="org.apache.forrest.conf.ForrestConfModule">
Inside this element there is a <valued> element. Add the
following as a child of that element:
<data>@project.data@</data>
Now you can access the value in your sitemap as {project:data}
Couple of points to note:
1 - Forrest must be restarted to register these changes.
2 - When upgrading Forrest the changes to forrest.xconf will be lost,
make a local backup as soon as you have it working (something like
local.forrest.xconf.backup), this way, it doesn't matter if you forget
during upgrade, you will still have a copy.
NOTE:
There is a new config system being developed in 0.8-dev that will
simplify this process and allow projects to arbitrarily add properties
without editing core files. It is currently working in SVN head, if you
are interested join us on the dev list.
Ross
|