Thanks for the reply Werner, I know that I have access to the FieldDescriptor in a handler. Unfortunately this doesn't seem to be a XMLFieldDescriptor. I debugged into the code to ensure this. I also found out that a XMLFieldDescriptor is somewhere in the stack but isn't accessible in the Handler.
Kind regards -------- Original-Nachricht -------- > Datum: Wed, 10 Oct 2007 09:39:28 +0200 > Von: Werner Guttmann <[EMAIL PROTECTED]> > An: [email protected] > Betreff: Re: [castor-user] Acessing XML Name in handler > Hi, > > have a look at > > http://castor.org/xml-fieldhandlers.html#Writing-a-GeneralizedFieldHandler > > in detail, where you are instructed to write your own FieldHandler > instance building on top of the GeneralizedFieldHandler class. > > With this approach, you'll be having access to the following method > > protected final FieldDescriptor getFieldDescriptor(); > > that you canb use to get hold of the corresponding (XML)FieldDescriptor. > > Regards > Werner > > [EMAIL PROTECTED] wrote: > > Hello, > > > > I need to access Information about the name of the xml entity or > > attribute name in my FieldHandler. In concrete I need to throw a > > special RuntimeException if a value for that entity/attribute is > > supplied that is not valid based on a database query. As a input > > value for my db query I need the name of the xml entity/attribute > > name. I found that XMLClassDescriptor.getXMLName() has the > > information I need, but unfortunately this information isn't > > available in my handler. > > > > Do you have any ideas how to solve my problem? Should I write an > > enhancement proposal for castor? > > > > Kind regards > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

