Skip to Content
author's profile photo Former Member
Former Member

Resource URL or Relative path.

Hi ,

In my webdynpro view i have a LinkToUrl button.I want to supply a URL to this button property Reference.

I have a HTML file in KM under documents/mydocs/test.html

my coding looks like this

IWDClientUser wdClientUser = WDClientUser.getCurrentUser(); sapUser = wdClientUser.getSAPUser();

IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);

IResourceContext resourceContext = new ResourceContext(ep5User);

IResourceFactory resourceFactory = ResourceFactory.getInstance();

RID pathRID = RID.getRID(wdContext.currentContextElement().getPath());

IResource resource = resourceFactory.getResource(pathRID, resourceContext);

after this coding,i dont know how to get the URL or full path.I have checked getTargetUrl but it returns null.

Can someone help me with this. ??

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 26, 2005 at 09:53 AM

    The complete path is


    You can also omit the "http://server:port" part.

    You can get all the documents inside the folder by the following

    IResource resource = resourceFactory.getResource(ridpath,


    // cast the object to a Collection

    ICollection collection = (ICollection) resource;

    // get the Collection's children

    IResourceList resourceList = collection.getChildren();

    // and finally get an iterator to walk through the set of children

    IResourceListIterator resourceListIterator = resourceList.listIterator();

    while (resourceListIterator.hasNext()) {

    // … and create a new context element for each of them

    IResource tempResource =;

    fileName = tempResource.getName();


    You can refer this weblog

    Uploading files to KM repository using Webdynpro APIs

    Creating folders in KM dynamically

    free to ask more

    award points. if useful.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.