Author |
Message |
15/11/2011 08:29:30
|
schmuck
Power User
Joined: 08/04/2008 16:27:16
Messages: 83
Offline
|
Hello,
Downloading with the BufferedContentManager works fine with the t:filedownloadbutton component
But what if there is an error while creating the dynamic content?
If there occurs an error and I return an NULL byte[] or an empty byte[] the user also getso the download successfully message!
Do you have suggestions for me how to handle this issue?
regards,
Michael Schmuck
|
|
|
15/11/2011 08:42:48
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
what do you do in case of an error?
What you should do: throw an Error/RuntimeException - which should cause a client side message popup.
Could you check?
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
15/11/2011 08:55:03
|
schmuck
Power User
Joined: 08/04/2008 16:27:16
Messages: 83
Offline
|
Okay, with throwing an RuntimeException I can show the user an default "there was an error" message within the download window.
That should be sufficient for now, but it would be nicer to provide an individual error message.
Thanks!
|
|
|
15/11/2011 08:59:36
|
schmuck
Power User
Joined: 08/04/2008 16:27:16
Messages: 83
Offline
|
One additional question to the filedownloadbutton.
Doesn't the filedownloadbutton trigger an roundtrip like the normal buttons?
While providing the download content, I set an other attribute in my bean that indicates that the file was already downloaded.
This is shown after the next flush (e.g. scrolling a table or pressing a button) but not after pressing the download button!
- michael
|
|
|
10/05/2013 16:44:14
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi,
It is also my experience that filedownloadbutton does not trigger and roundtrip like normal buttons.
Is there a special reason for that?
Regards - Daniel
|
|
|
03/02/2014 14:27:29
|
levy
Power User
Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline
|
Hi,
Again I have stepped in this.
Workaround is to set flush=true for the edited fields.
But I think it would be better that filedownloadbutton triggers and roundtrips, wouldn't it?
Regards, Daniel
|
|
|
|