on 03-19-2010 7:49 AM
HI,
In my application there is a filedownload element with a 0ByteResource at the start. I provide the file with a getter method for the input stream. This works fine, but I want add some warning messages in some cases. But the Messages I want to print with the Message Manager are not displayed when the user downloads the file. The messages occur only at the next roundtrip.
Is there a way to "flush" to messages on the screen when to user starts the download?
Can I start a roundtrip from the application?
Here is my code:
<b>public</b> com.sap.tc.webdynpro.progmodel.api.IWDInputStream getPdfToDownloadResourceInputStream(IPrivateCrmBlattOnline.IPdfToDownloadElement element)
{
//@@begin getPdfToDownloadResourceInputStream
wdComponentAPI.getMessageManager().reportSuccess("test message");
<b>return</b> WDResourceFactory.createInputStream(this.generatePDF().toByteArray());
//@@end
}
Best regards,
Peter
Hi
You can start roundtrip by triggering any event ,
workaround for this is could be : without using message manager API display your information with warning /success Image.
or
Simply implement the thread with process indicater will give you the real time customize information.
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
thanks for your answer, but somehow this doesn't work.
I have this code:
public com.sap.tc.webdynpro.progmodel.api.IWDInputStream getPdfToDownloadResourceInputStream(IPrivateCrmBlattOnline.IPdfToDownloadElement element)
{
//@@begin getPdfToDownloadResourceInputStream
wdComponentAPI.getMessageManager().reportSuccess("test message");
wdThis.wdFireEventPdfDownloadForced();
return WDResourceFactory.createInputStream(this.generatePDF().toByteArray());
//@@end
}
But the messages are not displayed. I also have tried to use a context attribute for the message, but this is not updated until I do a right click on the view or something. that starts a roundtrip.
Have I done something wrong?
Best regards,
Peter
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.