Skip to Content
avatar image
Former Member

Open Files from WD Table

hi all,

i've webdynpro iview that lists out a table with last column as 'urltoaction' which is basically a 'document link' (path to document currently in same server as ep). now i want to implement code to open that document (can be any type) on the onclick event.

tnx to all,

-JB

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 17, 2009 at 06:08 AM

    Hi

    Use LinkToAction UI Element...to open document from server.

    under the action of UI write code to open document. ....use this code

    IWDResource res = WDResourceFactory.createResource(

    new FileInputStream(FilePath"
    "
    wdContext.currentContextElement().getDirectory()

    +wdContext.currentContextElement().getFileName()), wdContext.currentContextElement().getFileName(),

    WDWebResourceType.DOC, true);

    wdComponentAPI.getMessageManager().reportSuccess("=="+FilePath);

    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(

    res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),

    res.getResourceName());

    Note: If the doc is there in KM repository then you use LinkToURL and pass the URL of document.

    Hope this will help u

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Bishnu Priya Sahoo

      hi priya,

      thanks for sharing inputs, i have checked the same its working fine in ie7.0 but not ie6.0. anyways lets explore more, and my qry was solved for anup's post. hence closing!!

      tnx,

      -JB

  • avatar image
    Former Member
    Jul 17, 2009 at 06:30 AM

    Hi,

    You can achieve this using File Download Functionality. You can search in SDN, there are many ways of implementing File Download functionality then according to your requirement you can implement your code.

    Regards

    Raghu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 17, 2009 at 06:11 AM

    Hi,

    Use "Link to Action" UI element.

    In that action u implement the code.

    Regards,

    Sunaina Reddy T

    Add comment
    10|10000 characters needed characters exceeded