Package org.openfaces.event

Examples of org.openfaces.event.UploadCompletionEvent


                return null;
            }

            @Override
            public Object invoke(ELContext elContext, Object[] objects) {
                UploadCompletionEvent completionEvent = (UploadCompletionEvent) objects[0];
                final List<FileUploadItem> files = completionEvent.getFiles();
                for (FileUploadItem fileUploadItem : files) {
                    final FileAttachedEvent fileAttachedEvent = new FileAttachedEvent(fileAttachments,
                            new FileAttachment(fileUploadItem.getFile().getName(), fileUploadItem.getFileName(), fileUploadItem.getFile().length()));

                    fileAttachments.getFileAttachedListener().invoke(elContext, new Object[]{fileAttachedEvent});
View Full Code Here


                AbstractFileUpload fileUpload = (AbstractFileUpload) component;
                MethodExpression completionListener = fileUpload.getCompletionListener();
                if (completionListener != null) {
                    completionListener.invoke(
                            context.getELContext(), new Object[]{
                            new UploadCompletionEvent(fileUpload, filesItems)});
                }
            }
            Rendering.addJsonParam(jsonObj, "allUploaded", allUploaded);
            Rendering.addJsonParam(jsonObj, "fileSizes", fileSizes);
            return jsonObj;
View Full Code Here

TOP

Related Classes of org.openfaces.event.UploadCompletionEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.