» List all forums
» » Forum: I am a newbie and need experts help!
» » » Thread: setting and reading properties on CmsResource
» » » » Post: setting and reading properties on CmsResource
Print at May 24, 2013 10:08:57 AM
|Posted by catnip at May 25, 2007 4:41:53 PM|
setting and reading properties on CmsResource
My xsd Type has string element called 'Currency' and what I am trying to achieve is to display all my files ordered by currency. For that I have decided to write my own Collector and a Comparator. The problem comes when I am trying to get the Currency property from the resource in order to sort on it.
What I am trying to do is map Currency to the resource property in the xsd file as:
<mapping element="Currency" apto="property:Currency"
and then retrieve it inside my comparator as:
List properties = cms.readPropertyObjects(resource, true);
String currency = CmsProperty.get("Currency", properties).getValue();
This is not working. Moreover, when I am iterating through list of properties I get from cms, all this list has is Title property, nothing else.
Please, can any one point me to what I am doing wrong?