[izpack-devel] condition aware UserInputPanel

Dennis Reil Dennis.Reil at reddot.de
Tue Nov 28 14:26:45 CET 2006


> can you please show how conditions.xml must be declared in the resources section.
Documentation will follow soon. For now:

Define a resource
<res id="conditions.xml" src="<PATH TO CONDITIONS-SPECIFICATION>" />		

in the xml, you have to specify the conditions like the following:

<?xml version="1.0" ?>
<conditions>	
	<condition type="variable" id="warfilesetup">
		<name>izpack.setuptype</name>
		<value>warfile</value>
	</condition>
	
	<condition type="not" id="notwarfilesetup">
		<condition type="ref" refid="warfilesetup" />	
	</condition>
	
	<condition type="not" id="notrdbsetup">
		<condition type="variable">
			<name>dbtype</name>
			<value>rdb</value>			
		</condition>
	</condition>
</conditions>

Additionally, add some panelconditions after the condition-elements:
<panelcondition panelid="installdirpanel"
conditionid="notwarfilesetup"/>
	<panelcondition panelid="jvmpanel" conditionid="notwarfilesetup"/>

To use the conditions in UserInputpanel, you just have to use the
attribute conditionid of a field-element in the spec for userinput
panels. The conditionid is just a reference to the id of a condition
element.

Is this enough as an answer to your question?

-- 
Regards
   Dennis



More information about the izpack-devel mailing list