cancel
Showing results for 
Search instead for 
Did you mean: 

does filedownload UI element has event?

Former Member
0 Kudos

Hi all,

Need your help.

In my case, I have a table contains some documents user has uploaded.

And user also wants to display the document by click the document link.

So I went to filedownload ui element. But I find that I can't catch the event of clicking the document link.

Why I want to catch the event? Because I don't want to load the document content at first, because if the ducument's size

is too big, that will lead the response speed very slow.I only want to display how many documents are there in the table. and if the user reallywants to see the documents ,then I'll catch the action, and before the action, I'll load the document content for

user. But I've tried several ways, it seems impossible for me to catch that.

Do you have the answer or other solutions.

Thanks and Regards.

Aaron.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

> and if the user reallywants to see the documents ,then I'll catch the action, and before the action, I'll load the document content for

user. But I've tried several ways, it seems impossible for me to catch that.

For such an approach, don't use the fileDownload UI element. Use instead a simple LinkToAction. It will look the same to the user. However when the click a link a normal WDA event will occur. You can then handle that event, load your data and trigger the file download with cl_wd_runtime_services=>attach_file_to_response

Former Member
0 Kudos

Hi Thomas,

Problem solved.

Thanks a lot.

Regards,

Aaron

Former Member
0 Kudos

Hi Aaron,

Can you brief your solution ?

Former Member
0 Kudos

Hi Manjunath,

The solution is pretty much like Thomas has said:

in my table, I use the linktoaction UI element instead of filedownload UI element for the document name column.

And then I can catch the event that user click the link, in the action handler, I use cl_wd_runtime_services=>attach_file_to_response method to display document.

Regards,

Aaron.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Yes there is no action bound to this..But MODIFYVIEW gets triggered i guess...

Try checking this standard WD_TEST_APPL_ACFUPDOWN for new UI element AcfUPdowanload in latest version.

Refer this -

Regards,

Lekha.