commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Beransky" <d...@dembel.org>
Subject Re: [digester] setting parent properties after the child's
Date Sat, 02 Dec 2006 00:24:14 GMT
> The section titled
>  "How do I get CallMethodRule to fire before SetNextRule?"
> might be what you need..

thanks.  it did help.  I had to replace addSetProperties with
addCallMethod, so the final sequence of rules now looks like:

        digester.addObjectCreate("*/menu", "javax.swing.JMenu", "class");
        digester.addObjectCreate("*/menu/item",
"javax.swing.JMenuItem", "class");
        digester.addObjectCreate("*/menu/item/action", null, "class");
        digester.addCallMethod("*/menu/item", "setText", 1, new
Class[]{String.class});
        digester.addCallParam("*/menu/item/", 0, "title");
        digester.addSetNext("*/menu/item/action", "setAction");
        digester.addSetNext("*/menu/item", "add");

wow, this feels like such a hack to me, though.  Is this the only way
to get the behavior I want?


Thanks
Dmitry

---------------------------------------------------------------------
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