<linked-forms> <parent-form name="article"> <child-form name="comment" field="article" /> </parent-form> </linked-forms>
got 3 classes, one for each XML node type. at the end, <linked-forms> is a custom HashMap(parent-form.name, List-of(child-form)). in this setup the parent-form bean becomes obsolete although this setup works fine. i would like to remove use of the parent-form class altogether. what i don't know is how to call method HashMap.put(key, val) from digester. i suppost i would have to create a temp class. but i don't know what goes in it :(. help needed :)
Digester digester = new Digester(); digester.setValidating(false);
digester.addObjectCreate("linked-forms", LinkedForms.class); digester.addObjectCreate( "linked-forms/parent-form", ParentForm.class); digester.addSetProperties( "linked-forms/parent-form", "name", "name"); digester.addObjectCreate( "linked-forms/parent-form/child-form", ChildForm.class); digester.addSetProperties( "linked-forms/parent-form/child-form", "name", "name"); digester.addSetProperties( "linked-forms/parent-form/child-form","field","field"); digester.addSetNext( "linked-forms/parent-form/child-form", "addChildForm"); digester.addSetNext("linked-forms/parent-form", "addLinkedForm");
thanx riyaz
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]