cancel
Showing results for 
Search instead for 
Did you mean: 

Open Files from WD Table

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member192434
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Anup,

thanks a lot for quick response. thanks to as well.

i made WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()), so that it opens in the same web-page browser. but if its a txt, html file takes less time, other if its a pdf, doc file its taking some time to open.

is these any alternative to close the browser in ALLOW_SAVE option??? if i open 5 files 5 browsers opend...! i wan to avoid it,

tnx,

JB

Former Member
0 Kudos

Hi,

Even I tried several ways as found from SDN to close the browser but was unsuccessfull

but now due to migration to a diffrenet version of Windows OS ,we dont face that problem anymore

Must be some settings in the browser would do,I guess

Just wanted to share with you

If you find anything do let me know

Cheers!

Priya

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Use "Link to Action" UI element.

In that action u implement the code.

Regards,

Sunaina Reddy T