ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Martin <pat...@online.fr>
Subject RE: AntForm question
Date Wed, 29 Nov 2006 11:06:31 GMT
Hello,

Yes, that's the way to go.

Antform allows to modify properties. The fact that it shows up when the
properties are set is normal.

Basically, the usual steps are:
1. You set *default* values for your properties (p1 and p2 for example)
2. You open the antform. Values in the antform are the ones set in step 1. This
allows the user to modify those *default* values.
3. Once validated, you go on your ant build with user defined properties or
default ones if unchanged.

I hope this helps.

Regards,

Patrick

Quoting "Rebhan, Gilbert" <Gilbert.Rebhan@huk-coburg.de>:

>
> Hi,
>
> use a condition to check whether those props are already set =
>
> <condition property="noAntForm">
>         <and>
>             <isset property="foo"/>
>             <isset property="bar"/>
>         </and>
>     </condition>
>
> and in the target where AntForm comes in use unless =
>
> <target name="useAntForm" unless="noAntForm">
>
> ...
> </target>
>
> so the target useAntForm is only executed if those props are not
> already set.
>
> Regards, Gilbert
>
>
> -----Original Message-----
> From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com]
> Sent: Wednesday, November 29, 2006 11:06 AM
> To: Ant Users List
> Subject: AntForm question
>
> When I run this, the form is shown, although all properties are already
> set. If all properties are set, why does it show the form? More
> important? How can I teach Antform not to show the form if all
> properties are set?
>
>           <property name="recipient" value="a"/>
>         <property name="subject" value="b"/>
>         <property name="body" value="c"/>
>         <property name="send" value="d"/>
>         <antform title="Send Mail"
> lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
>       save="properties.txt"
>       image="doc/images/testlogo.jpg">
>       <label>To send a mail, use the following form. Pick a recipient,
> type a subject and a body...the script will do the rest.</label>
>       <selectionProperty unless="recipient" label="Recipient: "
> property="recipient" values="address1@somewhere.com;
> address2@somewhere.com; address4@somewhere.com" separator=";"/>
>       <textProperty unless="subject" label="Subject : "
> property="subject" />
>       <multilineTextProperty unless="body" label="Message body: "
> property="body"/>
>       <booleanProperty unless="send" label="Send immediately: "
> property="send"/>
>         </antform>
>
>
> ---------------------------------
> Everyone is raving about the all-new Yahoo! Mail beta.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message