On Fri, 2006-12-01 at 14:58 -0800, Dmitry Beransky wrote:
> Hi,
> 
> I can't figure out how to properly set up rules so that this test does not 
> fail:

[snip] 

> The problem is that the rules above result in roughly the following
> sequence of calls:
> 
>    JMenu menu = new JMenu()
>    JMenuItem item = new JMenuItem();
>    item.setTitle("Copy");
>    Action action = new DefaultEditorKit.CopyAction();
>    item.setAction(action);
> 
> and setting action on a menu item will override previously set text.
> What I need to do is to set the item's text AFTER setting the action:
> 
>    JMenu menu = new JMenu()
>    JMenuItem item = new JMenuItem();
>    Action action = new DefaultEditorKit.CopyAction();
>    item.setAction(action);
>    item.setTitle("Copy");
> 
> any recommendations on how to change digester rules to accomplish that?

The digester FAQ is here:
  http://wiki.apache.org/jakarta-commons/Digester/FAQ

The section titled
  "How do I get CallMethodRule to fire before SetNextRule?"
might be what you need..

Regards,

Simon





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to