[webbeans-dev] [XML Field Decleration]

Nicklas Karlsson nickarls at gmail.com
Thu Dec 4 10:38:48 EST 2008


You can get a quick interpretation for me and then wait for a correct one ;-)

> In the spec within the part of the "Fields of a Web Bean", it says that
>
> "If a field declaration has more than one direct child element, and at least
> one of these elements is not <value> element in
> the Web Beans namespace, a DefinitionException is thrown by the Web Bean
> manager at initialization time."
>
> Then, is it true that the following definition is correct ? iow, can the
> field decleration contains both the <value> field and the injection field?
>
> <mybean:myField>
>     <value>15</value>
>     <mybean>x.y.x.AnotherBean</mybean>
> </mybean:myField>

I don't see a problem. The problem would be if the <value> wouldn't be
there. The sentence alone would not
forbid multiple <value> fields, either.

> Actually it also says that "An element that represents a field may declare
> an injected field, a producer field or a field with an initial value.".
>
> is there a contradiction?

Well, I dont see any "one of" so I don't see the contradiction.

This is only my interpretation of the word in the specs, I don't have
any more details.


-- 
---
Nik



More information about the weld-dev mailing list