----- Original Message ----- From: "Matt Benson" <[EMAIL PROTECTED]>
To: "Ant Users List" <[email protected]>
Sent: Friday, February 10, 2006 5:35 PM
Subject: Re: Displaying the value in a Java class?


--- Rhino <[EMAIL PROTECTED]> wrote:
[SNIP]
As for using <input>, I've been messing around with
that for the past half
hour and I could probably make do with it in a
pinch. It's just so darned
ugly compared to AntMenu/AntForm ;-) I really don't
like the input text box
that I can't seem to suppress no matter what I do. I

Hmm... don't know.  Are you using some particular
InputHandler?

Until a minute ago, I had no idea what an InputHandler was but, as far as I can tell from the article in Ant, I am using the default one. I haven't supplied any value to the -inputhandler switch so it appears I am getting the default one. Just for the heck of it, I tried adding this to the command line arguments (i.e. to the Arguments text area in Run As/Ant Build.../Main tab in Eclipse 3.1.1) but I can't get that to work at all; I used 'inputhandler PropertyFileInputHandler' and got:

BUILD FAILED

Unable to instantiate specified input handler class PropertyFileInputHandler : java.lang.ClassNotFoundException



I really don't have the time to learn how Ant works internally so that I can write my own task for this problem. I spent a couple of hours on that a few months back and couldn't make sense out of it at all. I'm sure it's all logical if you have someone step you through it or if you spend weeks learning how it all hangs together but I don't have that kind of time. That's why I'm posting, in the hope that someone with more Ant experience will help me get to a resolution quickly.


I've never bothered using Ant in a
graphical context... I can't think why or how the
property wouldn't come through.  Most tasks can't help
but support properties as the substitution is done in
Ant's core and is not a conscious choice.  I don't
remember now whether your example showed the menu text
as an attribute or as nested XML test; if the latter,
you might try the former.

Here is my task again:

<antmenu title="Verify Employment History Format"
 stylesheet="${resume.xml.dir}\resume.style"
 image="${resume.xml.dir}\maximal.orange.129x30.jpg">
<label>The current value of the DESIRED_EMPLOYMENT_HISTORY_FORMAT constant in the ResumeConstants class is: ${DESIRED_EMPLOYMENT_HISTORY_FORMAT}.</label>
 <label>If that value is satisfactory, press the Proceed button.</label>
<label>If the value is wrong, press the Abort button to stop the build. Then, edit the value of the property in the ResumeConstants.java class and run the build again.</label>
 <link label="Proceed" target="jar"/>
 <link label="Abort" target="abort"/>
</antmenu>

I think the answer to your question is that I am trying to display the property via nested XML text, i.e. the label tag. I'm not sure how to pass that same value to the AntMenu task as an attribute. And, if I did, how would AntMenu know where to put the attribute, i.e where to display the sentence that I want?

You can see the documentation for AntMenu at this page: http://antforms.sourceforge.net/usageam.html


If third-party tasks can
evade properties, it would be through nested text
(actually I'm pretty sure this is the case).  If it
was an attribute, I am at a loss... I would
triple-check for typos though.

I'm a good speller but I've checked that I spelled the property name very carefully. The 'echo' task displays the value just fine but the 'label' tag within AntMenu doesn't seem to be able to expand the property.

I'm running out of ideas....

--
Rhino



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.5/256 - Release Date: 10/02/2006


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to