|
|
Index
| Recent Threads
| Who's Online
| User List
| Register
| Search
| Help
| |
![]() |
OpenCms Forum » List all forums » Forum: I am a newbie and need experts help! » Thread: setting and reading properties on CmsResource |
|
Thread Status: Normal Total posts in this thread: 2 |
[Add To My Favorites] [Watch this Thread] |
| Author |
|
|
Stranger
|
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. |
||
|
|
Stranger
|
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. |
||
|
| [Show Printable Version of Thread] |