-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Good afternoon.
We has used button object in ZK6 and we find an error when it's working about IE11. Often button object doesn't work.
The code that we have developed is:
In a ZUL
=======
<button label="Examinar" upload="true" onupload="@command('onUploadPDF',upEvent=event)"/>
In a JAVA class
=============
@Command
public void onUploadPDF(@ContextParam(ContextType.BIND_CONTEXT) BindContext ctx) throws IOException {
UploadEvent upEvent = null;
Object objUploadEvent = ctx.getTriggerEvent();
if (objUploadEvent != null && (objUploadEvent instanceof UploadEvent)) {
upEvent = (UploadEvent) objUploadEvent;
if (upEvent != null) {
Media media = upEvent.getMedia();
if (media.getByteData().length>MAX_SIZE_2M){
Utils.infoWindow("Tamaño máximo permitido para subir ficheros es 2 Megabytes. ("+MAX_SIZE_2M+"). Tamaño del fichero subido = " + media.getByteData().length);
datosFactura.setPdfFactura(null);
}else if (!media.getName().substring(media.getName().lastIndexOf(".")+1).equalsIgnoreCase(BaseForm.FORMATO_PDF)){
Utils.infoWindow("Las facturas para adjuntar deben ser en formato PDF");
datosFactura.setPdfFactura(null);
}else{
datosFactura.setPdfFactura(media);
}
BindUtils.postNotifyChange(null, null, this.getDatosFactura(), "pdfFactura");
BindUtils.postNotifyChange(null, null, this.getDatosFactura(), "opcMostrarVerPdf");
}
}
}
Thank you in advance.
Hello Bengo,
The issue has been fixed for version 6.5.5 as shown below:
http://tracker.zkoss.org/browse/ZK-2044
What version are you currently using?
Best Regards,
Darksu
Asked: 2016-01-28 17:30:11 +0800
Seen: 18 times
Last updated: Jan 28 '16
wrong valueException come in front of modal popup [closed]
Use parameters in a conditional @command
Problems with multiple press and onCtrlKey
MVVM @save on the fly [closed]
Unable to activate destroyed desktop
org.zkoss.zk.ui.UiException: java.lang.ClassNotFoundException
How to put a image or Letter over image on a specific XY Coordinate