This applies to Java in general, you just have to write your own .properties file and then place it on the classpath so that it gets loaded in place of the one in xbean.jar. The name of the property bundle is "org.apache.xmlbeans.message"
(Also, if you are in the position of contributing better error messages back into XMLBeans, that'd be cool) Radu On Thu, 2007-05-10 at 11:05 +0800, Lim, Annie wrote: > Hi, > > > > I hope that someone can help me with this issue. We are currently > using the error messages retrieved from XmlError and displaying them > to the users as tooltips on the GUI. However, the default messages > within messages.properties are not user-friendly. To get around this > problem, I added some of the error codes into my own .properties file > to override the default messages e.g. > > > > cvc-maxLength-valid.1.1=The length of the value entered ($1) exceeds > the maximum length ($2) allowed > > > > But to get the arguments for the $1 and $2 values, I had to parse the > message retrieved from XmlError to get the correct arguments. This is > based on a lot of assumptions and is not the neat solution I was > after. > > > > Basically, I want to know two things, > > > > 1) Is it possible to “plug-in” a custom messages.properties into > the XmlBean framework that will override the default messages within > messages.proerties. The architect does not want me to edit the > original messages.properties within the XmlBean jar. > > > > 2) If it’s not possible to “plug-in” a custom > messages.properties file, is there a way in which I can get the > arguments used for the $1 and $2 qualification? From what I can see, > XmlError only has the code and the fully qualified message. > > > > 3) If 1 and 2 are not possible … is there another way ??? > > > > Any help would be deeply appreciated. > > > > Cheers, > > Annie > > > DISCLAIMER:--------------------------------------------------------------------------- > This Email may contain confidential and/or privileged information and is > intended solely for the addressee(s) named. If you have received this > information in error, or are advised that you have been posted this Email by > accident, please notify the sender by return Email, do not redistribute it, > delete the Email and keep no copies. > -------------------------------------------------------------------------------------- Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

