commons net 2.0.0

2007-06-29 Thread matu. agarwal
hi Can anyone tell me if there is any method for *configuration of provider in commons net 2.0.0 ?* ** Thanks in advance Matu Agarwal

Re: Attribute question for Commons Digester

2007-06-29 Thread James Carman
Have you tried an ObjectCreate followed by a SetProperties? On 6/29/07, Poulton, Jonathan [EMAIL PROTECTED] wrote: Surely someone has done this before? -Original Message- From: Poulton, Jonathan [mailto:[EMAIL PROTECTED] Sent: 28 June 2007 17:41 To: commons-user@jakarta.apache.org

RE: Attribute question for Commons Digester

2007-06-29 Thread Poulton, Jonathan
You mean: digester.addObjectCreate(article, Article.class); digester.addSetProperties(article, id, id); Yup. I've tried that. The actual value of the id field in the XML _1234 is ignored and 0 is set on the Article id field instead. I assume that this is because of the

Re: Digester problem

2007-06-29 Thread James Carman
Have you tried an ObjectCreate followed by a SetProperties? On 6/28/07, Poulton, Jonathan [EMAIL PROTECTED] wrote: Hi there, I've tried finding a solution to what I think should be quite a simple problem using the Commons Digester, but the tutorials I can find on the subject only really cover

Re: Attribute question for Commons Digester

2007-06-29 Thread James Carman
Yeah, I didn't notice the _ (or read the rest of the request). You'll need a custom rule here to convert that value, otherwise SetProperties would work (and you don't need to specify id/id because it'll match the properties to the attributes if they match exactly). Why the underscore anyway?

Attribute question for Commons Digester

2007-06-29 Thread Poulton, Jonathan
Surely someone has done this before? -Original Message- From: Poulton, Jonathan [mailto:[EMAIL PROTECTED] Sent: 28 June 2007 17:41 To: commons-user@jakarta.apache.org Subject: Digester problem Hi there, I've tried finding a solution to what I think should be quite a simple problem

RE: Attribute question for Commons Digester

2007-06-29 Thread Poulton, Jonathan
Also, does the plugin class need to implement a specific class? It doesn't look that way in the examples, and there doesn't appear to be any way to get the Digester to call a specific method in the plugin class. I have the feeling I have misunderstood something here.. -Original Message-

Re: Attribute question for Commons Digester

2007-06-29 Thread James Carman
Just make a custom rule... public class SetIdRule extends Rule { public void begin(java.lang.String namespace, java.lang.String name, org.xml.sax.Attributes attributes) { Article article = ( Article )digester.peek(); // get the thing off the top of the stack

RE: Attribute question for Commons Digester

2007-06-29 Thread Poulton, Jonathan
I have no idea why the underscore is there; but its there in the source XML and my code has to deal with it *shrug*. I do realise that I need a custom rule - but I can't seem to get it working. Say I have a rule called ArticleIDTransform, then I do something like: PluginCreateRule pcr =

Re: [chain] Can't load class resource.

2007-06-29 Thread Julio S. G.
Great. I did the changes and made a patch. As I read at the How to Get Involved section, it seems to me that it's just to send a attched file. Is it correct? Who will apply the patch at main trunk? Thanks, Julio On 5/15/07, Niall Pemberton [EMAIL PROTECTED] wrote: On 5/15/07, Julio S. G.

Re: [Digester] addFactoryCreate problem (I think)

2007-06-29 Thread Robert Watkins
In the final analysis, I suspect the problem had to do with the order and way in which Digester is pushing and popping to/from the stack, and not with ObjectCreationFactory. The solution I eventually came up with (my this is a quiet list!) was a refactoring of my approach, using a single Rule at

Re: [chain] Can't load class resource.

2007-06-29 Thread Niall Pemberton
On 6/29/07, Julio S. G. [EMAIL PROTECTED] wrote: Great. I did the changes and made a patch. As I read at the How to Get Involved section, it seems to me that it's just to send a attched file. Is it correct? Who will apply the patch at main trunk? Thanks, Julio On 5/15/07, Niall Pemberton