Package org.openfaces.component.input.fileattachments

Examples of org.openfaces.component.input.fileattachments.AbstractFileAttachmentAction


public abstract class AbstractAttachmentActionRenderer extends RendererBase {
    private static final String JS_SCRIPT_URL = "input/fileattachments.js";

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        AbstractFileAttachmentAction abstractFileAttachmentAction = (AbstractFileAttachmentAction) component;
        Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
        final FileAttachment fileAttachment = (FileAttachment) requestMap.get(FileAttachmentsRenderer.REQ_FILE_ATTACHMENT_KEY);
        abstractFileAttachmentAction.setFileAttachment(fileAttachment);
        final FileAttachments fileAttachmentsComponent = (FileAttachments) requestMap.get(FileAttachmentsRenderer.REQ_FILE_ATTACHMENTS_COMP_KEY);
        abstractFileAttachmentAction.setFileAttachmentsComponent(fileAttachmentsComponent);
        encodeComponent(context, abstractFileAttachmentAction);
        encodeScriptAndStyles(context, abstractFileAttachmentAction);

    }
View Full Code Here


        for (UIComponent component : fileAttachmentsChildren) {
            if (!(component instanceof BaseColumn) &&
                    !(component instanceof OUIClientAction) && !Rendering.isA4jSupportComponent(component)) {
                childComponents.add(component);
            } else if (component instanceof AbstractFileAttachmentAction) {
                AbstractFileAttachmentAction fileAttachmentAction = (AbstractFileAttachmentAction) component;
                fileAttachmentAction.setFileAttachmentsComponent(fileAttachmentsComponent);
                childComponents.add(component.getParent());
            }
        }

        FileAttachmentsTableStyles tableStyles = new FileAttachmentsTableStyles(fileAttachmentsComponent, childComponents);
View Full Code Here

TOP

Related Classes of org.openfaces.component.input.fileattachments.AbstractFileAttachmentAction

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.