Hi Dennis,
Thanks so much for your quick reply, the method you
suggested, casting my root object to the IUnmarshallable interface works just
fine :)
I've been using the JiBX framework for just 2 days
now and have been very pleased with how quickly I was able to get up and running
with it,
The problem is that I'm using the default attribute to set each
element value to the empty string if it doesn't exist, so nothing is
ever null. Right now I've had to settle for doing similar to what you
suggested as your second option, but I don't really like it because,
since nothing is ever
It's probably best if you can show an example of what you're trying to
do, with the fragment of the binding definition and the actual post-set
method code.
- Dennis
Beet wrote:
The problem is that I'm using the default attribute to set each
element value to the empty string if it doesn't exist,
Here's the fragment from the mapping file:
...
structure name=Batch usage=optional test-method=hasBatch
post-set=postset
value name=TS style=attribute field=ts/
value name=MaxKG field=maxKGPerBatch/
/structure
...
it doesn't matter what I put into postset because it doesn't ever
Okay, that makes it clear. The post-set method (along with factory,
pre-set, and pre-get) only get used when there's an object associated
with the structure. In this case you don't have an actual object, just
some contained fields. If you go up a level (or more) to where you have
the
okay, I see what you're saying...
the problem with going up a level is that you lose the level of
granularity you sometimes need. I know that you listed some
workarounds before, and that's what I'm using right now, but it seems
like it'd be a nice little 'enhancement' to allow method hooks at