Details
Description
DynamicVariables does not work as expected/documented. The dynamic variables are overwritten. As documented, you could have more dynamic variables with one name and different conditions. According the conditions, the right value should be set when you proceed in installer. However, only the last definition of the value with the last condition is take into the account.
Example:
<conditions>
<condition type="variable" id="isoracle">
<name>database.type</name>
<value>oracle</value>
</condition>
<condition type="variable" id="ismaxdb">
<name>database.type</name>
<value>maxdb</value>
</condition>
<condition type="variable" id="ismysql">
<name>database.type</name>
<value>mysql</value>
</condition>
</conditions>
<dynamicvariables>
<variable name="database.jdbcdriver" value="com.oracle.OracleDiver" condition="isoracle" />
<variable name="database.jdbcdriver" value="com.mysql.MysqlDiver" condition="ismysql" />
<variable name="database.jdbcdiver" value="com.maxdb.MaxdbDiver" condition="ismaxdb" />
</dynamicvariables>
In this example I would await, that after user input on one page and a choose of database.type by the user, the variable database.jdbcdiver would be set accordingly. However, as there can be only one definition of DynamicVariable per name in current implementation, only the last one (in this case maxdb) condition is taken.
I would await, that the concept of dynamic variable is able to handle this.
There are two patches available, for version 3.11 and current trunk.
The patches were not tested but the implementation should be clear. (no tests included)
I did not apply the patch, but changed the behaviour to the support of multiple values with different conditions.