Hi,

I am trying to get the Ruby container to be able to handle component
properites.

I have created a sample Helloworld (obviously :)) component and have now
added a property to it.  I have added the property to the .componentType
sidefile as well as to the .scdl.  Now here are the problems I am
experiencing: -

- I need to access the default values that are set for the property  in the
.componentType file.  The property loader makes this default value available
as an instance of a 'Document' and can be access thro the getDefaultValue()
method of the Property class.  When I looked up this document instance is
does not seem to contain any data.  Am I missing something here ?  I hacked
a bit with StaxUtil.createPropertyValue and suspect that there the property
value fragment that is created is not appended as a child to the document
that is created there and hence the doc. is empty.  Not sure if this is the
right way.

- Also if the default value is provided as a Document, what is the
programming model (for e.g. are there Utility classes) using which I can
convert this Document to a JavaType (I am tempted to ask if I should use the
databinding stuff here.. say AXIOM2Java or something of that sort)

- When loading all of this propety info into a instance of the Property
class, I find that the 'JavaType' is not set by the PropertyLoader.  Have
this null creates problems when at a later stage, the ComponentLoader is
loading properties specified as part of Component Definition (in the
.scdl).  Here the ComponentLoader, in order to create the PropertyValue
needs to know the JavaType so that it can to and get the right object
factory.  Since the java type is null there is an NPE that is thrown.
- When loading an instance of Property, we have the xsd type of the
property.  Must we have a table that maps xsd types to java types and look
this up to set the 'JavaType' attribute of the class Property.

Can somebody please help me get around these problems?   What am I missing
in all of this?  If these are bugs to be fixed, then please let me know if
what I have mentioned as possible work arounds are the fixes.  Othewise the
alternatives.  Then I can work on them and submit a patch.

Thanks

- Venkat

Reply via email to