commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@gmail.com>
Subject Re: [chain] xml properties
Date Fri, 31 Dec 2004 01:33:49 GMT
On Thu, 30 Dec 2004 19:18:25 -0600, Vic <vin@friendvu.com> wrote:
> If in a catalog I do this:
> <define        name="fts"
>         className="org.sandra.servicer.textsrch.SrchCmd"
>             fileLoc="/usr/local/xfts/boardidx"
>         />
> 
> How can I in get a the value of fileLoc in my command instance?

As things are currently set up, you can't use attributes other than
"name" and "className"  on the <define> element itself.  Instead,
you'd use them when you actually created a command with this rule
later on, like this:

    <fts fileLoc="/usr/local/xfts/boardidx"/>

which is just a shorter way to say:

    <command className="org.sandra.servicer.textsrch.SrchCmd"
        fileLoc="/usr/local/xfts/boardidx"/>

For this to work, of course, you need a public void setFileLoc(String
fileLoc) method on your SrchCmd class, which will be called when the
<fts> element is parsed.

> tia,
> .V

Craig

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


Mime
View raw message