users@jaxb.java.net

Re: sequence element order

From: Jimmy Han <jhan_at_cisco.com>
Date: Fri, 11 Feb 2005 15:29:09 -0800

Kohsuke,

Thanks. I am currently using 1.0, but can consider to migrate to 2.0.
What I want to do is:

PropertyDescriptor[] descs = Introspector.getBeanInfo(myobj.getClass());

Right now the PropertyDescriptors in the returned descs are
in the alphabeta order of element names. If you can make it
in the sequence order, that'll be great. (If people need alphabeta
order, they can get it by sorting the property names). Or
if you can set an index attribute to each property based on
the element order, that will also satisfy me (so I can reorder
it by sorting that attribute).

-
Jimmy

Kohsuke Kawaguchi wrote:

> Jimmy Han wrote:
>
>> Ryan,
>>
>> Thanks for reply.
>> I am working on an editor that can edit objects of classes generated
>> by JAXB, using introspection. I'd like the editor to list elements
>> in a particular order that can be specified in the schema.
>
>
> I think this is actually an interesting use case for 2.0.
>
> At the runtime, we build an internal data structure that captures most
> of those information. So if we can give you access to those data model,
> I guess you can do those things.
>
> Are you developing your editor for JAXB 1.0 or JAXB 2.0?
>