Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 47848 invoked from network); 1 Dec 2006 23:56:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Dec 2006 23:56:25 -0000 Received: (qmail 21120 invoked by uid 500); 1 Dec 2006 23:56:30 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 21072 invoked by uid 500); 1 Dec 2006 23:56:30 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 21061 invoked by uid 99); 1 Dec 2006 23:56:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2006 15:56:29 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [210.54.141.243] (HELO fep03.xtra.co.nz) (210.54.141.243) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2006 15:56:17 -0800 Received: from [10.1.1.8] (really [222.153.64.97]) by fep03.xtra.co.nz with ESMTP id <20061201235554.YNBG6113.fep03.xtra.co.nz@[10.1.1.8]> for ; Sat, 2 Dec 2006 12:55:54 +1300 Subject: Re: [digester] setting parent properties after the child's From: Simon Kitching To: Jakarta Commons Users List In-Reply-To: <6b3b3dba0612011458p67da4d25h74e92a688e258c0c@mail.gmail.com> References: <6b3b3dba0612011458p67da4d25h74e92a688e258c0c@mail.gmail.com> Content-Type: text/plain Date: Sat, 02 Dec 2006 12:55:51 +1300 Message-Id: <1165017351.5237.59.camel@blackbox> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org