cancel
Showing results for 
Search instead for 
Did you mean: 

Context node is empty after upload a pdf

Former Member
0 Kudos

Hi all,

I met a problem:

I did a pdf-upload web dynpro application and when I upload a pdf file into this.

the pdf is shown correctly,but, I just found the node which is bounded with the interactive form is empty.

I search the sdn and found this method:

WDInteractiveFormHelper.transferPDFDataIntoContext.

I put this in my upload action like this:

WDInteractiveFormHelper.transferPDFDataIntoContext(wdContext.currentContextElement().getData(),wdContext.nodePerson());

But after redeploy it,

It has no effect. The node is still empty.

I am confused. Is there any other solution about this?

Thank you!

Best Regards

delma

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I restart the system and it works fine.

But I don't know why.

Best Regards

delma

Former Member
0 Kudos

Hi Delma,

Have you checked the mapping of the Context Binary Attribute to which PDFSource is mapped for IF is proper?

If you are using 2 views, one for upload and other for Display, then map the PDFSOURCE beetween these 2 views.

For getting the binary data, try with the code below:

byte[] arrFileBuf = new byte[wdContext.currentContextElement().getPdfSource().length];

arrFileBuf = wdContext.currentContextElement().getPdfSource();

ArrFileBuf will contain the binary data (your PDF).

Hope this helps!!

Regards,

Arafat