cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: use DefaultConfiguration class (avalon API)
Date Sun, 03 Mar 2002 17:39:38 GMT
> From: yuryx [mailto:yuryx@mobicomk.donpac.ru]
> 
> Hi !
> Can anyone help me with following:
> With my 'cocoon's action' I have to use DefaultConfiguration class. I
> need modify my config file from this class (with use methods
> setAttribute and setValue) -it possible?

Try DefaultConfigurationSerializer from the
org.apache.avalon.framework.configuration.


> But I dont know how to create it (I need examples :( ) with link to my
> config file. :(

Creating configuration object is quite simple. Snippet from
JavascriptProgram.java:
--------------------------------------
        config = new DefaultConfiguration("", "GeneratorSelector");
        child = new DefaultConfiguration("file", "");
        child.setValue(file.toString());
        config.addChild(child);

        for (Iterator i = dependecies.iterator(); i.hasNext(); ) {
            child = new DefaultConfiguration("dependency", "");
            child.setValue(i.next().toString());
            config.addChild(child);
        }
--------------------------------------

Vadim


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message