<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Yo wrote:
<blockquote cite="midbe11ba430602281043k20075865y@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type"
content="text/html; charset=ISO-8859-1">
Hello,<br>
I need to know if there is a function in OpenCms API to get all the
properties of a resource. I´ve got only the name of the resource.<br>
<br>
Thank in you in advance,<br>
<br>
Yo<br>
<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></pre>
</blockquote>
//[..] construct the cmsJspActionElement first, I don't have the code
in mind, but its well documented in the alcacon docs<br>
CmsObject cmsObject = cmsJspActionElement.getCmsObject();<br>
List properties = cmsObject.readPropertyObjects();<br>
<br>
int count = properties.size();<br>
for(int i=0; i<count;i++={<br>
CmsProperty currProperty = (CmsProperty) properties.get(i);<br>
<br>
String propertyName = currProperty.getName();<br>
String propertyName = currProperty.getValue();<br>
}<br>
<br>
<br>
I did not test the code but if should be not too wrong. <br>
You can do more with CmsProperty, for example get property values that
are _shared_ among all siblings of one resource - just look at the api
doc of the CmsProperty class .<br>
<br>
cheers<br>
Christian<br>
</body>
</html>