Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Getting KM Resources of a Group using Webdynpro java

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++)  /// 




   String logonId = wdContext.nodeGroups().getElementAt(i).getAttributeAsText("groupId");



    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)




      String uniqId = (String);

      IGroup thisGroup = groupFact.getGroup(uniqId);

// 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();



        IResourceListIterator resourceListIterator = resourceList.listIterator();






   }catch (Exception e) {

    // TODO: handle exception




Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question