on 09-25-2012 1:13 PM
Hi Experts,
I want to display the KM Resources of a Group using Webdynpro java (NW 7.0 ehp1).
So can any one please suggest me whether it is possible or not, and if it is possible so please provide me some coding examples.
I have tried with a logic that, first I extracted the users of that Group and then tried to display in the table, but that is not fullflling requiremtn.
I just want to display the KM resources directly from the Group.
Also I have tried to do this directly but I'm getting error when I am tring to declare the " IResourceContext resourceContext = new ResourceContext(ep5Group);". The error is "The constructor ResourceContext(IGroup) is undefined"
Please help me.
Here I have attached the coding which I had tried.
for(int i=0; i<wdContext.nodeGroups().size(); i++) ///
{
if(wdContext.nodeGroups().isMultiSelected(i))
{
String logonId = wdContext.nodeGroups().getElementAt(i).getAttributeAsText("groupId");
try
{
IPublicResourceAppsComp.IGroupsElement groupsElement = null;
IPublicResourceAppsComp.IGroupResourcesElement groupResourcesElement = null;
IGroupFactory groupFact = UMFactory.getGroupFactory();
IGroupSearchFilter groupFilt = groupFact.getGroupSearchFilter();
groupFilt.setUniqueName(logonId, ISearchAttribute.LIKE_OPERATOR, false);
ISearchResult result = groupFact.searchGroups(groupFilt);
if(result.getState() == ISearchResult.SEARCH_RESULT_OK)
{
while(result.hasNext())
{
String uniqId = (String)result.next();
IGroup thisGroup = groupFact.getGroup(uniqId);
// com.sapportals.portal.security.usermanagement.IGroup ep5Group = UMFactory.getGroupFactory().getEP5Group(thisGroup);
IResourceContext resourceContext = new ResourceContext(ep5Group);
String resourceID = wdContext.currentContextElement().getCurrentFolder();
RID rid = RID.getRID(resourceID);
com.sapportals.wcm.repository.IResource resource = com.sapportals.wcm.repository.ResourceFactory.getInstance().getResource(rid, resourceContext);
if(resource.isCollection()== true)
{
ICollection collection = (ICollection)resource;
IResourceList resourceList = collection.getChildren();
if(resourceList.size()>0)
{
IResourceListIterator resourceListIterator = resourceList.listIterator();
}
}
}
}
}catch (Exception e) {
// TODO: handle exception
}
}
}
ResourceContext is defined for Iuser inly, not iGroup
IResourceContext resourceContext = new ResourceContext(ep5Group);
this will nto work, you should use
ResourceContext getInstance(com.sap.security.api.IUser user, Locale fallbackLocale)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mainak Ghosh,
did you try to get the KM Resouces using group selection using Web dynpro java?
Regards,
Ramireddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mainak, did you complete your task. I have also got the simillar kind of task.
My task is, first get the all groups from UME and after that based on the group we need to display all KM folder/documents etc.. associated that selected group.
Now I have complted the first part to get all groups from UME. Now I want display the KM resources directly from the Group.
if you have code, can you please provide me the code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.