You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Vic <vi...@friendvu.com> on 2004/12/31 02:18:25 UTC

[chain] xml properties

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?
tia,
.V

-- 
RiA-SoA w/JDNC <http://www.SandraSF.com> forums
- help develop a community
My blog <http://www.sandrasf.com/adminBlog>


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


Re: [chain] xml properties

Posted by Craig McClanahan <cr...@gmail.com>.
On Thu, 30 Dec 2004 19:18:25 -0600, Vic <vi...@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