Hi
On Thu, Feb 26, 2009 at 7:29 AM, Shuchao Wan <[email protected]> wrote:
> Hi, Guys,
>
> I have some questions about <Property> attribute mustSupply, would you like
> to help me with them. Thanks in advance.
>
> 1. mustSupply is one of attributes of element Property, it is used to
> indicate that the property value must be supplied by components that uses
> the implementation. So my understanding is that there are only two places we
> can set this attribute. One is the child elment of <componentType>, the
> other is the child element of <composite> where the composite is utilized as
> component implementation. That is to say, mustSupply shouldn't be one of
> attribute of <component>'s <Property>. Am I right?
>
>
Sounds right to me. There is an editorial error in the OASIS spec where this
attribute appears in the component property pseudo schema when it shouldn't
> 2. If mustSupply is specified as true, while the user doesn't provide any
> property value, what will happen? Any expection will be thrown? It is
> strange that I didn't see any warning message or expection in my test.
>
I would expect an error to be raised as the composite is in error.
>
> 3. I'm not very sure about the meaning of ASM60034. It says that "For a
> composite used as a component implementation, all properties of components
> within the composite, where the underlying component implementation
> specifies "mustSupply=true" for the property, MUST either *specify a value
> for the property* or source the value from a composite property. " I know
> how to specify the source value, but how to specify the value for the
> property? Does it mean a default value? However, in composite chapter of
> specification, it says that "when mustSupply="true" the component has to
> supply a value since the composite has no default value for the property. "
>
>
>
There is a hierarchy implied here and two different scenarios I think;
Scenario- components in composites
----------------------------------------------------
composite
component
implementation.composite
composite
property name="prop1" VALUE SUPPLIED HERE
component
property mustSupply="true" source="$prop1"
Scenario - composites as component implementations
----------------------------------------------------------------------------
composite
component
property name="prop1" VALUE SUPPLIED HERE
implementation.composite
composite
property mustSupply="true" name="prop1"
component
Regards
Simon