Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 97412 invoked from network); 21 Oct 2003 23:04:35 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 21 Oct 2003 23:04:35 -0000 Received: (qmail 49366 invoked by uid 500); 21 Oct 2003 23:04:16 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 49180 invoked by uid 500); 21 Oct 2003 23:04:14 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 49088 invoked from network); 21 Oct 2003 23:04:13 -0000 Received: from unknown (HELO unxcoms01.ecnetwork.co.nz) (202.135.116.201) by daedalus.apache.org with SMTP; 21 Oct 2003 23:04:13 -0000 Received: from serpent.ecnetwork.co.nz (serpent [202.135.190.10]) by unxcoms01.ecnetwork.co.nz (8.12.8/8.12.8) with ESMTP id h9LN45lC022206; Wed, 22 Oct 2003 12:04:11 +1300 Received: from [202.135.190.48] (unknown [202.135.190.48]) by serpent.ecnetwork.co.nz (Postfix) with ESMTP id E187E1035; Wed, 22 Oct 2003 11:06:42 +1200 (NZST) Subject: RE: [digester] How to call a constructor with my own values (rather than theXML attributes or elements) From: Simon Kitching To: commons-user@jakarta.apache.org Cc: Kumar Pankaj In-Reply-To: <90B3A0967470D44CB8FDE749075123289C6A27@av1s008.at-work.local> References: <90B3A0967470D44CB8FDE749075123289C6A27@av1s008.at-work.local> Content-Type: text/plain Message-Id: <1066777180.2540.2310.camel@PCSIMON.ecnnz.ecnetwork.co.nz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Wed, 22 Oct 2003 11:59:40 +1300 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Kumar, The ObjectParamRule can't currently be invoked from xmlrules, nor can the PathCallParamRule. A patch for ObjectParamRule support in xmlrules has been submitted on the development email list, but the Digester maintainers haven't yet evaluated it. So you could search the dev list for that email and compile the attached code yourself. Or if you can wait 1-2 weeks, I think the odds are fairly good that one of the maintainers will have committed the patch by then; at that point you could use a nightly snapshot of Digester. If xmlrules allows you to invoke FactoryCreateRule to create your class instance, then you could implement a factory class which creates your object and then passes the appropriate value for the "content" attribute of your object. Or you could change to using the digester API (rather than xmlrules) until this is sorted out. Regards, Simon On Tue, 2003-10-21 at 20:27, Kumar Pankaj wrote: > Hi Simon, > > Do you know the equivalent of ObjectParamRule that can be specified in the Digester Rules XML (i mean via). Is it a sub element under element ? Do i have to download the new digester version, i have 1.5 version. > > Sorry for so many questions. i am rookie in Digester > > thanks, > Pankaj > -----Original Message----- > From: Simon Kitching [mailto:simon@ecnetwork.co.nz] > Sent: Monday, October 20, 2003 10:36 PM > To: Jakarta Commons Developers List > Subject: Re: How to call a constructor with my own values (rather than > theXML attributes or elements) > > > Hi Kumar, > > > You can use the ObjectParamRule to pass literal strings (or other > objects) to methods. > > There is also a PathCallParamRule class in CVS, but it was added since > the last release so you would need to download it from CVS. > > Regards, > > Simon > > On Tue, 2003-10-21 at 03:03, Kumar Pankaj wrote: > > Hi Gurus, > > > > I have been totally stumped by this. > > I want to set a property in Java bean based on the pattern (it does not have any attributes) > > Following is my simple XML > > > > > > > > > > Tom Cruise > > > > Mission Impossible > > > > > > > > Vikram Seth > > > > Principles of Life > > > > > > > > > > > > For this, i want to create a single Java object named Content and set the propoerty called category to Film when it comes to Film pattern. Now, I have not been able to use either or because none of them can pass the pattern name as parameters to the methods. > > > > Thanks in Advance, > > Pankaj > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org