[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
BufferedContent Exception Handling  XML
Forum Index -> Development
Author Message
schmuck

Power User
[Avatar]

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
[ICQ]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5526
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
schmuck

Power User
[Avatar]

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!
[ICQ]
schmuck

Power User
[Avatar]

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
[ICQ]
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
[WWW]
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
[WWW]
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team