0

Error: button object in zk6 and IE11

asked 2016-01-28 17:30:11 +0800

Bengo gravatar image Bengo
3 1

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.

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-01-28 21:40:12 +0800

Darksu gravatar image Darksu
1991 1 4

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

link publish delete flag offensive edit
Your answer
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

Follow
1 follower

RSS

Stats

Asked: 2016-01-28 17:30:11 +0800

Seen: 18 times

Last updated: Jan 28 '16

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