Problem with ZKUI "upload" Button

asked 2013-06-24 17:03:27 +0800

TLnga gravatar image TLnga

I've seen this reported in other entries, but I've not seen an answer, so I'm bumping it. I'm using the ZKUI plug-in in a Grails app, and the issue is with a Button control that I set with "upload = true". I don't seem to get the "onUpload" event, so after what appears to be the upload of the file, I can't do anything to actually save it.

I'm using ZKUI plug-in version 0.5.4. I also wonder why the button itself displays strangely (can't upload image of it, but it looks to have extra panels at the top and bottom).

Code-wise, all I'm doing is something like:

class UploadPanel { Button importButton

Panel addButtonPanel () { Panel buttonPanel = new Panel (style: "margin:10px") Panelchildren btnPanelChildren = new Panelchildren()

btnPanelChildren << (importButton = new Button (label: 'Import...', upload: 'true'))



public void onUpload$importButton(UploadEvent e) { Messagebox.show('in OnUpload!') . . . } }

What's happening is I'm getting the drop-down file chooser, I pick the file, a progress box displays near the button, and then...nothing. I'm not getting the "onUpload" event.

I tried using a regular button, without "upload: 'true'", and put "Fileupload.get()" inside the "onClick" event. I get the popup to select the file to import, I select the file, and then get the filename/size displayed in the dialog with an animated circle that never stops.

Any help would be much appreciated.

delete flag offensive retag edit


Found an answer: https://github.com/xiaochong/zkui/issues/2#issuecomment-9921203

TLnga ( 2013-06-24 23:33:46 +0800 )edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2013-06-24 17:03:27 +0800

Seen: 22 times

Last updated: Jun 24 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More