You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Hans Schwaebli <ha...@yahoo.com> on 2006/11/29 11:05:51 UTC

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.

RE: AntForm question

Posted by Patrick Martin <pa...@online.fr>.
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" <Gi...@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


Re: AntForm question

Posted by Patrick Martin <an...@gmail.com>.
Hello,

If I understand correctly, you want antform to diaply when running in
user mode but not when running automatically.

I guess the easiest for that is to set a property in your automated
task command line and call antform only if this property is not set.
This can be achieved with <target> if/unless attributes (as suggested
by Gilbert earlier) or using ant-contrib <if> task.

command line:
ant -Dautomated="true"

script:
<target name="show-form" unless="automated">
  <antform>...</antform>
</target>

Cheers,

Patrick

On 11/30/06, Hans Schwaebli <ha...@yahoo.com> wrote:
> Hi Patrick,
>
>   thank you for the quick implementation.
>
>   Lets assume I have a target which might be called by a user or automated by a nightly build.
>
>   If the nightly build calls it, then your solution works. It requires using the "unless" attribute. But if a user calls it, the unless attribute prevents him from seing and modifiying the value in the form.
>
>   What about that the nightly build script should be able to disable the showing of the form even if in the form no "unless" attributes have been used? Maybe by setting a parameter like "walkthrough=true".
>
>   Its no real fine plan which I have, just brainstorming ideas.
>
> Patrick Martin <an...@gmail.com> wrote:
>   Hello,
>
> Antform 2.0 beta 2 just got released.
>
> Patrick
>
> Changes from 2.0 beta 1 to 2.0 beta 2
>
> Changes that could break older environments:
> - Empty form do not display any more by default.
> The previous behaviour can be obtained by setting the
> new antform/antmenu attribute showwhenempty.
>
> Fixed bugs:
> - Documentation fixed for attribute loopexit.
>
> Changes from 1.4.6 to 2.0 beta 1
>
> Changes that could break older environments:
> - Deprecate   "data" attribute. This attribute was not
> coherent with other components which use the property
> value as default value.
> The build won't fail if the data attribute is set, but a
> Warning will be printed out and the table may not be
> initialized.
>
> Fixed bugs:
> - Fixed focus management. The antform "focus" attribute is
> deprecated and replaced by a "focus" attribute on
> individual widgets.
> - All requirable widgets had their labels prefixed with '*',
> not only required ones.
> - Validate all antmenuitems configuration, not only the
> first one.
> - NPE when specifying selector before values in all
> selectionproperty type of widgets.
> - NPE when user closes the form using the window decorators
> (top-right cross on Windows)
>
> Other changes:
> - Streamlined user action management
> - Replaced
> byand
> by .
>
> and
> will still work but they are
> deprecated.
> A Warning message will be printed if you continue using
> them.
> - Created for the antform bottom buttons.
> This new element deprecates the following antform
> attributes:
> . okmessage
> . resetmessage
> . nexttarget
> . previoustarget
> It also deprecates the widget.
> - Added possibility to loop on antform/antmenu after having
> called a target.
> This allows for example to have a main menu on which we
> keep on getting back after each action. The loop exits
> when the user click on a button which exitloop attribute
> is set to true.
> - Add attribute newproject to action components (buttons,
> menus, ...). Value of this attribute should be true by
> default (similar to antcall). When set to false, the
> target will be invoked without creating a new project.
> This allows to set property in the called target that will
> be reusable in the calling one.
> - reset will now check current property value in the ant
> project. This is useful when using loop="true" in
> antform/antmenu and calling targets with
> newproject="false".
> - Made antform compatible with Java 1.3. The following
> components cannot work with Java 1.3 because they use
> JSpinner or JFormattedTextField:
> . NumberProperty
> . ListProperty
> . DateProperty
> - Add attributes "fontname", "fontstyle" and "fontsize" to
> widgets textproperty, multilinetextproperty and
> dateproperty
>
>
> On 11/29/06, Hans Schwaebli wrote:
> > Yes, would be good.
> >
> > Ant scripts must run without interruption if called programmatically, for example from a nightly build with Cruise Control. Then there is noone there to push the ok button.
> >
> >
> > Patrick Martin
> wrote: Hello,
> >
> > The thing is that antform is meant to be different from [input] . It allows user
> > to override default values.
> >
> > However, I missed the fact that you were using the unless attributes. What we
> > may be able to do is skip the form display if no "widget" (antform sub-element)
> > is to be displayed.
> >
> > Would that be ok for you?
> >
> > Patrick
> >
> > Quoting Hans Schwaebli :
> >
> > > The thing I tried to suggest kindly is that Antform does not show any form if
> > > all properties for the form have already been set. This is the default
> > > behavior of Ant scripts comparing to Input tasks. It simply skips the Input
> > > task if the property was set. The same behavior should apply to forms if all
> > > properties for the form have been set before. That would enable automation.
> > >
> > >
> > >
> > > "Rebhan, Gilbert" wrote:
> > >
> > > i just had a quick look in the antform manual,
> > > you're already using the unless attributes.
> > >
> > > so no need for the extra condition
> > >
> > > the script works as it should, showing only
> > > the main screen but you're not able to
> > > declare your own recipient,subject, body
> > > as those properties are already set.
> > >
> > > my env here = ant 1.6.5, jdk1.4.2_05,Win2k
> > >
> > > Regards, Gilbert
> > >
> > > -----Original Message-----
> > > From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de]
> > > Sent: Wednesday, November 29, 2006 11:53 AM
> > > To: Ant Users List
> > > Subject: RE: AntForm question
> > >
> > >
> > > Hi,
> > >
> > > use a condition to check whether those props are already set =
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > and in the target where AntForm comes in use unless =
> > >
> > >
> > >
> > > ...
> > >
> > >
> > > 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?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
> > > save="properties.txt"
> > > image="doc/images/testlogo.jpg">
> > > To send a mail, use the following form. Pick a recipient,
> > > type a subject and a body...the script will do the rest.
> > > property="recipient" values="address1@somewhere.com;
> > > address2@somewhere.com; address4@somewhere.com" separator=";"/>
> > > property="subject" />
> > > property="body"/>
> > > property="send"/>
> > >
> > >
> > >
> > > ---------------------------------
> > > 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
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > > 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
> >
> >
> >
> >
> > ---------------------------------
> > 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
>
>
>
>
> ---------------------------------
> 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


Re: AntForm question

Posted by Hans Schwaebli <ha...@yahoo.com>.
Hi Patrick,
   
  thank you for the quick implementation. 
   
  Lets assume I have a target which might be called by a user or automated by a nightly build.
   
  If the nightly build calls it, then your solution works. It requires using the "unless" attribute. But if a user calls it, the unless attribute prevents him from seing and modifiying the value in the form.
   
  What about that the nightly build script should be able to disable the showing of the form even if in the form no "unless" attributes have been used? Maybe by setting a parameter like "walkthrough=true".
   
  Its no real fine plan which I have, just brainstorming ideas.

Patrick Martin <an...@gmail.com> wrote:
  Hello,

Antform 2.0 beta 2 just got released.

Patrick

Changes from 2.0 beta 1 to 2.0 beta 2

Changes that could break older environments:
- Empty form do not display any more by default.
The previous behaviour can be obtained by setting the
new antform/antmenu attribute showwhenempty.

Fixed bugs:
- Documentation fixed for attribute loopexit.

Changes from 1.4.6 to 2.0 beta 1

Changes that could break older environments:
- Deprecate   "data" attribute. This attribute was not
coherent with other components which use the property
value as default value.
The build won't fail if the data attribute is set, but a
Warning will be printed out and the table may not be
initialized.

Fixed bugs:
- Fixed focus management. The antform "focus" attribute is
deprecated and replaced by a "focus" attribute on
individual widgets.
- All requirable widgets had their labels prefixed with '*',
not only required ones.
- Validate all antmenuitems configuration, not only the
first one.
- NPE when specifying selector before values in all
selectionproperty type of widgets.
- NPE when user closes the form using the window decorators
(top-right cross on Windows)

Other changes:
- Streamlined user action management
- Replaced 
byand 
by .

and 
will still work but they are
deprecated.
A Warning message will be printed if you continue using
them.
- Created for the antform bottom buttons.
This new element deprecates the following antform
attributes:
. okmessage
. resetmessage
. nexttarget
. previoustarget
It also deprecates the widget.
- Added possibility to loop on antform/antmenu after having
called a target.
This allows for example to have a main menu on which we
keep on getting back after each action. The loop exits
when the user click on a button which exitloop attribute
is set to true.
- Add attribute newproject to action components (buttons,
menus, ...). Value of this attribute should be true by
default (similar to antcall). When set to false, the
target will be invoked without creating a new project.
This allows to set property in the called target that will
be reusable in the calling one.
- reset will now check current property value in the ant
project. This is useful when using loop="true" in
antform/antmenu and calling targets with
newproject="false".
- Made antform compatible with Java 1.3. The following
components cannot work with Java 1.3 because they use
JSpinner or JFormattedTextField:
. NumberProperty
. ListProperty
. DateProperty
- Add attributes "fontname", "fontstyle" and "fontsize" to
widgets textproperty, multilinetextproperty and
dateproperty


On 11/29/06, Hans Schwaebli wrote:
> Yes, would be good.
>
> Ant scripts must run without interruption if called programmatically, for example from a nightly build with Cruise Control. Then there is noone there to push the ok button.
>
>
> Patrick Martin 
wrote: Hello,
>
> The thing is that antform is meant to be different from [input] . It allows user
> to override default values.
>
> However, I missed the fact that you were using the unless attributes. What we
> may be able to do is skip the form display if no "widget" (antform sub-element)
> is to be displayed.
>
> Would that be ok for you?
>
> Patrick
>
> Quoting Hans Schwaebli :
>
> > The thing I tried to suggest kindly is that Antform does not show any form if
> > all properties for the form have already been set. This is the default
> > behavior of Ant scripts comparing to Input tasks. It simply skips the Input
> > task if the property was set. The same behavior should apply to forms if all
> > properties for the form have been set before. That would enable automation.
> >
> >
> >
> > "Rebhan, Gilbert" wrote:
> >
> > i just had a quick look in the antform manual,
> > you're already using the unless attributes.
> >
> > so no need for the extra condition
> >
> > the script works as it should, showing only
> > the main screen but you're not able to
> > declare your own recipient,subject, body
> > as those properties are already set.
> >
> > my env here = ant 1.6.5, jdk1.4.2_05,Win2k
> >
> > Regards, Gilbert
> >
> > -----Original Message-----
> > From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de]
> > Sent: Wednesday, November 29, 2006 11:53 AM
> > To: Ant Users List
> > Subject: RE: AntForm question
> >
> >
> > Hi,
> >
> > use a condition to check whether those props are already set =
> >
> >
> >
> >
> >
> >
> >
> >
> > and in the target where AntForm comes in use unless =
> >
> >
> >
> > ...
> >
> >
> > 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?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
> > save="properties.txt"
> > image="doc/images/testlogo.jpg">
> > To send a mail, use the following form. Pick a recipient,
> > type a subject and a body...the script will do the rest.
> > property="recipient" values="address1@somewhere.com;
> > address2@somewhere.com; address4@somewhere.com" separator=";"/>
> > property="subject" />
> > property="body"/>
> > property="send"/>
> >
> >
> >
> > ---------------------------------
> > 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
> >
> >
> >
> >
> > ---------------------------------
> > 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
>
>
>
>
> ---------------------------------
> 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

  
  
 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.

Re: AntForm question

Posted by Patrick Martin <an...@gmail.com>.
Hello,

Antform 2.0 beta 2 just got released.

Patrick

Changes from 2.0 beta 1 to 2.0 beta 2

Changes that could break older environments:
- Empty form do not display any more by default.
  The previous behaviour can be obtained by setting the
  new antform/antmenu attribute showwhenempty.

Fixed bugs:
- Documentation fixed for attribute loopexit.

Changes from 1.4.6 to 2.0 beta 1

Changes that could break older environments:
- Deprecate <table> "data" attribute. This attribute was not
  coherent with other components which use the property
  value as default value.
  The build won't fail if the data attribute is set, but a
  Warning will be printed out and the table may not be
  initialized.

Fixed bugs:
- Fixed focus management. The antform "focus" attribute is
  deprecated and replaced by a "focus" attribute on
  individual widgets.
- All requirable widgets had their labels prefixed with '*',
  not only required ones.
- Validate all antmenuitems configuration, not only the
  first one.
- NPE when specifying selector before values in all
  selectionproperty type of widgets.
- NPE when user closes the form using the window decorators
  (top-right cross on Windows)

Other changes:
- Streamlined user action management
- Replaced <link> by <button> and <linkbar> by <buttonbar>.
  <link> and <linkbar> will still work but they are
  deprecated.
  A Warning message will be printed if you continue using
  them.
- Created <controlbar> for the antform bottom buttons.
  This new element deprecates the following antform
  attributes:
  . okmessage
  . resetmessage
  . nexttarget
  . previoustarget
  It also deprecates the <cancel> widget.
- Added possibility to loop on antform/antmenu after having
  called a target.
  This allows for example to have a main menu on which we
  keep on getting back after each action. The loop exits
  when the user click on a button which exitloop attribute
  is set to true.
- Add attribute newproject to action components (buttons,
  menus, ...). Value of this attribute should be true by
  default (similar to antcall). When set to false, the
  target will be invoked without creating a new project.
  This allows to set property in the called target that will
  be reusable in the calling one.
- reset will now check current property value in the ant
  project. This is useful when using loop="true" in
  antform/antmenu and calling targets with
  newproject="false".
- Made antform compatible with Java 1.3. The following
  components cannot work with Java 1.3 because they use
  JSpinner or JFormattedTextField:
  . NumberProperty
  . ListProperty
  . DateProperty
- Add attributes "fontname", "fontstyle" and "fontsize" to
  widgets textproperty, multilinetextproperty and
  dateproperty


On 11/29/06, Hans Schwaebli <ha...@yahoo.com> wrote:
> Yes, would be good.
>
> Ant scripts must run without interruption if called programmatically, for example from a nightly build with Cruise Control. Then there is noone there to push the ok button.
>
>
> Patrick Martin <pa...@online.fr> wrote: Hello,
>
> The thing is that antform is meant to be different from  [input] . It allows user
> to override default values.
>
> However, I missed the fact that you were using the unless attributes. What we
> may be able to do is skip the form display if no "widget" (antform sub-element)
> is to be displayed.
>
> Would that be ok for you?
>
> Patrick
>
> Quoting Hans Schwaebli :
>
> > The thing I tried to suggest kindly is that Antform does not show any form if
> > all properties for the form have already been set. This is the default
> > behavior of Ant scripts comparing to Input tasks. It simply skips the Input
> > task if the property was set. The same behavior should apply to forms if all
> > properties for the form have been set before. That would enable automation.
> >
> >
> >
> > "Rebhan, Gilbert"  wrote:
> >
> > i just had a quick look in the antform manual,
> > you're already using the unless attributes.
> >
> > so no need for the extra condition
> >
> > the script works as it should, showing only
> > the main screen but you're not able to
> > declare your own recipient,subject, body
> > as those properties are already set.
> >
> > my env here = ant 1.6.5, jdk1.4.2_05,Win2k
> >
> > Regards, Gilbert
> >
> > -----Original Message-----
> > From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de]
> > Sent: Wednesday, November 29, 2006 11:53 AM
> > To: Ant Users List
> > Subject: RE: AntForm question
> >
> >
> > Hi,
> >
> > use a condition to check whether those props are already set =
> >
> >
> >
> >
> >
> >
> >
> >
> > and in the target where AntForm comes in use unless =
> >
> >
> >
> > ...
> >
> >
> > 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?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
> > save="properties.txt"
> > image="doc/images/testlogo.jpg">
> > To send a mail, use the following form. Pick a recipient,
> > type a subject and a body...the script will do the rest.
> > property="recipient" values="address1@somewhere.com;
> > address2@somewhere.com; address4@somewhere.com" separator=";"/>
> > property="subject" />
> > property="body"/>
> > property="send"/>
> >
> >
> >
> > ---------------------------------
> > 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
> >
> >
> >
> >
> > ---------------------------------
> > 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
>
>
>
>
> ---------------------------------
> 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


RE: AntForm question

Posted by Hans Schwaebli <ha...@yahoo.com>.
Yes, would be good.

Ant scripts must run without interruption if called programmatically, for example from a nightly build with Cruise Control. Then there is noone there to push the ok button.


Patrick Martin <pa...@online.fr> wrote: Hello,

The thing is that antform is meant to be different from  [input] . It allows user
to override default values.

However, I missed the fact that you were using the unless attributes. What we
may be able to do is skip the form display if no "widget" (antform sub-element)
is to be displayed.

Would that be ok for you?

Patrick

Quoting Hans Schwaebli :

> The thing I tried to suggest kindly is that Antform does not show any form if
> all properties for the form have already been set. This is the default
> behavior of Ant scripts comparing to Input tasks. It simply skips the Input
> task if the property was set. The same behavior should apply to forms if all
> properties for the form have been set before. That would enable automation.
>
>
>
> "Rebhan, Gilbert"  wrote:
>
> i just had a quick look in the antform manual,
> you're already using the unless attributes.
>
> so no need for the extra condition
>
> the script works as it should, showing only
> the main screen but you're not able to
> declare your own recipient,subject, body
> as those properties are already set.
>
> my env here = ant 1.6.5, jdk1.4.2_05,Win2k
>
> Regards, Gilbert
>
> -----Original Message-----
> From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de]
> Sent: Wednesday, November 29, 2006 11:53 AM
> To: Ant Users List
> Subject: RE: AntForm question
>
>
> Hi,
>
> use a condition to check whether those props are already set =
>
>
>
>
>
>
>
>
> and in the target where AntForm comes in use unless =
>
>
>
> ...
>
>
> 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?
>
>
>
>
>
>
>
>
>
>
>
>
>
> lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
> save="properties.txt"
> image="doc/images/testlogo.jpg">
> To send a mail, use the following form. Pick a recipient,
> type a subject and a body...the script will do the rest.
> property="recipient" values="address1@somewhere.com;
> address2@somewhere.com; address4@somewhere.com" separator=";"/>
> property="subject" />
> property="body"/>
> property="send"/>
>
>
>
> ---------------------------------
> 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
>
>
>
>
> ---------------------------------
> 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



 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.

RE: AntForm question

Posted by Patrick Martin <pa...@online.fr>.
Hello,

The thing is that antform is meant to be different from <input>. It allows user
to override default values.

However, I missed the fact that you were using the unless attributes. What we
may be able to do is skip the form display if no "widget" (antform sub-element)
is to be displayed.

Would that be ok for you?

Patrick

Quoting Hans Schwaebli <ha...@yahoo.com>:

> The thing I tried to suggest kindly is that Antform does not show any form if
> all properties for the form have already been set. This is the default
> behavior of Ant scripts comparing to Input tasks. It simply skips the Input
> task if the property was set. The same behavior should apply to forms if all
> properties for the form have been set before. That would enable automation.
>
>
>
> "Rebhan, Gilbert" <Gi...@huk-coburg.de> wrote:
>
> i just had a quick look in the antform manual,
> you're already using the unless attributes.
>
> so no need for the extra condition
>
> the script works as it should, showing only
> the main screen but you're not able to
> declare your own recipient,subject, body
> as those properties are already set.
>
> my env here = ant 1.6.5, jdk1.4.2_05,Win2k
>
> Regards, Gilbert
>
> -----Original Message-----
> From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de]
> Sent: Wednesday, November 29, 2006 11:53 AM
> To: Ant Users List
> Subject: RE: AntForm question
>
>
> Hi,
>
> use a condition to check whether those props are already set =
>
>
>
>
>
>
>
>
> and in the target where AntForm comes in use unless =
>
>
>
> ...
>
>
> 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?
>
>
>
>
>
>
>
>
>
>
>
>
>
> lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
> save="properties.txt"
> image="doc/images/testlogo.jpg">
> To send a mail, use the following form. Pick a recipient,
> type a subject and a body...the script will do the rest.
> property="recipient" values="address1@somewhere.com;
> address2@somewhere.com; address4@somewhere.com" separator=";"/>
> property="subject" />
> property="body"/>
> property="send"/>
>
>
>
> ---------------------------------
> 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
>
>
>
>
> ---------------------------------
> 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


Changing Date format

Posted by Pritesh Saharey <pr...@wipro.com>.
Dear All,
         I had a file named "data", which contains the date of an indefinite
number in the format year/month/day;

The Data file looks like this:

Data
-----
1864/06/22
1854/04/29
1823/12/07
:
:
:

I want to change the format of this date so that the new "datachnage" file
will look something like this:

Datachange
----------
(June 22, 1864)
(April 29, 1854)
(December 07, 1823)
:
:
:

Can anyone throw an idea on this?

Regards,
Pritesh




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

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


RE: AntForm question

Posted by Hans Schwaebli <ha...@yahoo.com>.
The thing I tried to suggest kindly is that Antform does not show any form if all properties for the form have already been set. This is the default behavior of Ant scripts comparing to Input tasks. It simply skips the Input task if the property was set. The same behavior should apply to forms if all properties for the form have been set before. That would enable automation.
  


"Rebhan, Gilbert" <Gi...@huk-coburg.de> wrote:
  
i just had a quick look in the antform manual,
you're already using the unless attributes.

so no need for the extra condition

the script works as it should, showing only
the main screen but you're not able to
declare your own recipient,subject, body
as those properties are already set.

my env here = ant 1.6.5, jdk1.4.2_05,Win2k

Regards, Gilbert

-----Original Message-----
From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de] 
Sent: Wednesday, November 29, 2006 11:53 AM
To: Ant Users List
Subject: RE: AntForm question


Hi,

use a condition to check whether those props are already set =








and in the target where AntForm comes in use unless =



...


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?













lookAndFeel="com.sun.java.swing.plaf.windows.WindowsLookAndFeel"
save="properties.txt"
image="doc/images/testlogo.jpg">
To send a mail, use the following form. Pick a recipient,
type a subject and a body...the script will do the rest.
property="recipient" values="address1@somewhere.com;
address2@somewhere.com; address4@somewhere.com" separator=";"/>
property="subject" />
property="body"/>
property="send"/>



---------------------------------
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



 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.

RE: AntForm question

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
i just had a quick look in the antform manual,
you're already using the unless attributes.

so no need for the extra condition

the script works as it should, showing only
the main screen but you're not able to
declare your own recipient,subject, body
as those properties are already set.

my env here = ant 1.6.5, jdk1.4.2_05,Win2k
 
Regards, Gilbert

-----Original Message-----
From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de] 
Sent: Wednesday, November 29, 2006 11:53 AM
To: Ant Users List
Subject: RE: AntForm question


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


RE: AntForm question

Posted by "Rebhan, Gilbert" <Gi...@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