Should this go into the trunk, or does it only solve problems unique to your use case?
On Tue, Jul 27, 2010 at 5:49 AM, Chantal Ackermann <chantal.ackerm...@btelligent.de> wrote: > Hi Mitch, > > thanks for the code. Currently, I've got a different solution running > but it's always good to have examples. > >> > If realized >> > that I have to throw an exception and add the onError attribute to the >> > entity to make that work. >> > >> I am curious: >> Can you show how to make a method throwing an exception that is accepted by >> the onError-attribute? > > the catch clause looks for "Exception" so it's actually easy. :-D > > Anyway, I've found a "cleaner" way. It is better to subclass the > XPathEntityProcessor and put it in a state that prevents it from calling > "initQuery" which triggers the dataSource.getData() call. > I have overridden the initContext() method setting a go/no go flag that > I am using in the overridden nextRow() to find out whether to delegate > to the superclass or not. > > This way I can also avoid the code that fills the tmp field with an > empty value if there is no value to query on. > > Cheers, > Chantal > > -- Lance Norskog goks...@gmail.com