synyx GmbH & Co. KG Homepage Welcome Guest   | Login
  Search  
  Index  | Recent Threads  | Who's Online  | User List  | Register  | Search  | Help  | RSS feeds


Quick Go »
Thread Status: Normal
Total posts in this thread: 2
[Add To My Favorites] [Watch this Thread]
Author
Previous Thread This topic has been viewed 1207 times and has 1 reply Next Thread
Female catnip
Stranger



Joined: Apr 30, 2007
Posts: 8
Status: Offline

setting and reading properties on CmsResource

Hi all,
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:

<mappings>
<mapping element="Currency" apto="property:Currency"
</mappings>

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?

Thank you.
[May 25, 2007 4:41:53 PM] Show Printable Version of Post     [Link] Report threatening or abusive post: please login first  Go to top 
Female catnip
Stranger



Joined: Apr 30, 2007
Posts: 8
Status: Offline

Re: setting and reading properties on CmsResource

I found my problem.. it was something specific to my xsd, - I had two levels of xsd types (two different files) and I was defining the mapping at wrong level - it should have been defined in 'root' level.
[May 25, 2007 9:58:55 PM] Show Printable Version of Post     [Link] Report threatening or abusive post: please login first  Go to top 
[Show Printable Version of Thread]