on 12-10-2007 2:05 PM
Hi All,
I have a custom property called "Read" (Under Miscellaneous Tab) for every documents under KM Content in Portal. How can i access the custom property via WebDynpro? Does anyone have sample codes regarding that?
Regards,
Divya
Hi,
I can't read a km custom property from webdynpro java.
This is mi source code:
IProperty prop = resource.getProperty(propName);
I have imported the library:
import com.sapportals.portal.prt.resource.IResource;
but I have this error:
"The method getProperty(IPropertyName) is undefined for the type IResource"
I don't know where is the problem...
Thanks and regards
Mónica
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there
This post is quite old, anyway - here is some input which helps reading some properties.
public String getProperty(IResource res, String name) {
String value = null;
IPropertyName propName = newPropertyName(IWcmConst.SAP_WCM_NAMESPACE + "/custom", name);
IProperty prop = res.getProperty(propName);
value = prop.getStringValue();
}
Best regards
Marco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To access KM from WebDynpro check the following link:
Also check the following thread:
Regards.
Rajat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
Could u pls tell me , how to get the "property location " in portal .
and also I need Property value .
IPropertyName propDelete= new PropertyName("propertylocationinportal", "propertyName");
say for example:
IPropertyName propDelete= new PropertyName("http://servername/xmlns/cm/...", "Delete");
Thanks in advance
Hi divya,
to read a docs property,
first
IPropertyName propDelete= new PropertyName("propertylocationinportal", "propertyName");
say for example:
IPropertyName propDelete= new PropertyName("http://servername/xmlns/cm/...", "Delete");
Now, using path RId and all, read the resource from the required location,
pathRID = RID.getRID("Path);
resourseFactory = ResourceFactory.getInstance();
ICollection collection = (ICollection) resourseFactory.getResource(pathRID, resourseContext);
resourceList = collection.getChildren();
resourceListIterator = resourceList.listIterator();
while (resourceListIterator.hasNext()) {
resource = resourceListIterator.next();
if (resource.isCollection())
continue;
IPropertyMap propMap = resource.getProperties();
IProperty deleteProp = propMap.get(propDelete);
String strdelProp = deleteProp .getStringValue();
Regards,
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii Frnds,
I have the same requirement .
Someone has any solution .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.