Hi,
I am trying to mimic (with some variations) the example of custom fields in the izpack documentation, specifically, this one:
<field id="activemq.connection.panel.title" type="title"/>
<field align="left" id="activemq.connection.description" type="staticText"/>
<field type="space"/>
<field maxRow="10" minRow="1" type="custom" variable="activemq.connection.count">
<spec>
<col>
<field type="rule" variable="activemq.connection.address">
<spec default="tcp://localhost:7000" id="activemq.connection.url.label" layout="O:5:U :// O:15:U : N:5:5" resultFormat="displayFormat"/>
</field>
<validator class="com.izforge.izpack.panels.userinput.validator.UniqueValidator" id="activemq.connection.host.unique"/>
</col>
</spec>
</field>
First thing I have noticed, activating the -debug -stacktrace option is that the layout pattern is generating exceptions due to the ":" that is separating the pieces of content. The exception is:
Failed to parse: :
com.izforge.izpack.api.exception.IzPackException: Invalid no. of tokens: 0 in rule: :
If I change the character separator in layout, it also fails (with invalid number of tokens, 1 instead of 0). In any case, the setup proceeds so it is a ‘minor’ issue.
The real problem in my case is that the panel is ignoring the new value in dynamic variable variables (e.g. activemq.connection.address.<n>). I am presetting in install.xml a dynamic variable <activemq.connection.address.1 as whatever ‘blank’ value (eg. “-://-:0000”). Then, by a piece of java code in a previous panel validator, I am setting the activemq.connection.address.1 as e.g. “tcp://realhost:8080” and I see at log that the variable is set to the new value. But when I press next to go to the panel I see in the logs the message “refreshing dynamic variables…” and the values refreshed are the ones I had at the beginning. This behavior is not happening in other situations and panels (updated values are preserved), only in this one.
Any idea?