users@jaxb.java.net

Re: Default Value...

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 28 Nov 2006 13:34:50 +0100

Hi.

> I have a new problem on my plugin.
> On SingleField.java there is a statement like this
>
> JExpression defaultValue = null;
> if(prop.defaultValue!=null)
> defaultValue = prop.defaultValue.compute(outline.parent());
>
> Which checking for a default value in the schema.
> What is not understandable is that the logical expression (defaultValue
> != null) always return null though I have added default values on the
> schema. Even this default values appear on the XMLElement annotation
> inside the generated code.
>
> My question is
> 1. how can I check for this default value in my plugin
> 2. how to get the value.
>
> Thanks.

There's a default values plugin in jaxb2-commons, try looking in there.

Bye.
/lexi