Package org.openfaces.component

Examples of org.openfaces.component.Position


        Styles.renderStyleClasses(context, fileUpload);

        int uploadedSize = 0;
        boolean duplicateAllowed = true;//fileUpload.isDuplicateAllowed();

        Position popupPosition = fileUpload.getPosition();

        List<String> listOfImages = new LinkedList<String>();
        String defStopUrl = null;
        if (fileUpload.getStopButtonNearProgress()) {
            if (stopButton == null) {
                defStopUrl = Resources.getURL(context, null, null, DEFAULT_STOP_URL);
                listOfImages.add(defStopUrl);
                Rendering.renderPreloadImagesScript(context, listOfImages, false);
            }
        }
        Script initScript = new ScriptBuilder().initScript(context, fileUpload, "O$.SingleFileUpload._init",
                uploadedSize,
                fileUpload.getNotUploadedStatusText(),
                fileUpload.getInProgressStatusText(),
                fileUpload.getUploadedStatusText(),
                fileUpload.getFileSizeLimitErrorText(),
                fileUpload.getUnexpectedErrorText(),
                fileUpload.getAcceptedFileTypes(),
                duplicateAllowed,
                clientId + BROWSE_BTN_ID,
                addButtonClass,
                addButtonOnMouseOverClass,
                addButtonOnMouseDownClass,
                addButtonOnFocusClass,
                addButtonDisabledClass,
                fileUpload.isDisabled(),
                fileUpload.getTabindex(),
                progressBar.getClientId(context),
                fileUpload.getStoppedStatusText(),
                fileUpload.getStoppingStatusText(),
                uniqueId,
                Utilities.getFunctionOfEvent(fileUpload.getOnchange()),
                Utilities.getFunctionOfEvent(fileUpload.getOnstart()),
                Utilities.getFunctionOfEvent(fileUpload.getOnend()),
                Utilities.getFunctionOfEvent(fileUpload.getOnfilestart()),
                Utilities.getFunctionOfEvent(fileUpload.getOnfileinprogress()),
                Utilities.getFunctionOfEvent(fileUpload.getOnfileend()),
                Utilities.getFunctionOfEvent(fileUpload.getOnwrongfiletype()),
                Utilities.getFunctionOfEvent(fileUpload.getOndirectorydropped()),
                dropTargetDragoverClass,
                getRender(context, fileUpload),
                getExternalDropTargetId(context, fileUpload),
                fileUpload.getAcceptedMimeTypes(),
                fileUpload.getLayoutMode(),
                defStopUrl,
                getIconStyle(fileUpload, layoutMode),
                fileUpload.getShowInfoAfterUpload(),
                fileUpload.getBrowseButtonDuringUpload(),
                fileUpload.getStopButtonNearProgress(),
                fileUpload.getDirectoryDroppedText(),
                fileUpload.getWrongFileTypeText(),
                getExternalButtonId(context, fileUpload),
                fileUpload.getShowInPopup(),
                getPositionedBy(context, fileUpload),
                popupPosition.getHorizontalAlignment(),
                popupPosition.getVerticalAlignment(),
                popupPosition.getHorizontalDistance(),
                popupPosition.getVerticalDistance()
        );

        Rendering.renderInitScript(context, initScript,
                Resources.utilJsURL(context),
                Resources.jsonJsURL(context),
View Full Code Here


        Styles.renderStyleClasses(context, multipleFileUpload);

        int uploadedSize = 0;
        boolean duplicateAllowed = true;//fileUpload.isDuplicateAllowed();

        Position popupPosition = abstractFileUpload.getPosition();
        String browseButtonId = clientId + (multipleFileUpload.getExternalBrowseButton() == null || multipleFileUpload.getShowInPopup() ?
                DIV_HEADER_ID : FOOTER_DIV_ID) + BROWSE_BTN_ID;

        Script initScript = new ScriptBuilder().initScript(context, multipleFileUpload, "O$.FileUpload._init",
                multipleFileUpload.getMinQuantity(),
                multipleFileUpload.getMaxQuantity(),
                uploadedSize,
                fileInfoClass,
                infoTitleClass,
                progressBarClass,
                infoStatusClass,
                multipleFileUpload.getNotUploadedStatusText(),
                multipleFileUpload.getInProgressStatusText(),
                multipleFileUpload.getUploadedStatusText(),
                multipleFileUpload.getFileSizeLimitErrorText(),
                multipleFileUpload.getUnexpectedErrorText(),
                multipleFileUpload.getAcceptedFileTypes(),
                duplicateAllowed,
                browseButtonId,
                addButtonClass,
                addButtonOnMouseOverClass,
                addButtonOnMouseDownClass,
                addButtonOnFocusClass,
                addButtonDisabledClass,
                multipleFileUpload.isDisabled(),
                multipleFileUpload.isAutoUpload(),
                multipleFileUpload.getTabindex(),
                progressBar.getClientId(context),
                multipleFileUpload.getStoppedStatusText(),
                multipleFileUpload.getStoppingStatusText(),
                multipleFileUpload.isMultiple(),
                uniqueId,
                Utilities.getFunctionOfEvent(multipleFileUpload.getOnchange()),
                Utilities.getFunctionOfEvent(multipleFileUpload.getOnstart()),
                Utilities.getFunctionOfEvent(multipleFileUpload.getOnend()),
                Utilities.getFunctionOfEvent(multipleFileUpload.getOnfilestart()),
                Utilities.getFunctionOfEvent(multipleFileUpload.getOnfileinprogress()),
                Utilities.getFunctionOfEvent(multipleFileUpload.getOnfileend()),
                Utilities.getFunctionOfEvent(multipleFileUpload.getOnwrongfiletype()),
                Utilities.getFunctionOfEvent(multipleFileUpload.getOndirectorydropped()),
                dropTargetDragoverClass,
                multipleFileUpload.getUploadMode(),
                getRender(context, multipleFileUpload),
                getExternalDropTargetId(context, multipleFileUpload),
                multipleFileUpload.getAcceptedMimeTypes(),
                multipleFileUpload.getDirectoryDroppedText(),
                multipleFileUpload.getWrongFileTypeText(),
                getExternalButtonId(context, multipleFileUpload),
                multipleFileUpload.getShowInPopup(),
                getPositionedBy(context, multipleFileUpload),
                popupPosition.getHorizontalAlignment(),
                popupPosition.getVerticalAlignment(),
                popupPosition.getHorizontalDistance(),
                popupPosition.getVerticalDistance()
        );

        Rendering.renderInitScript(context, initScript,
                Resources.utilJsURL(context),
                Resources.jsonJsURL(context),
View Full Code Here

    public void setCloseButtonText(String closeButtonText) {
        this.closeButtonText = closeButtonText;
    }

    public Position getPosition() {
        Position position = Components.findChildWithClass(this, Position.class, "<o:position>");
        if (position == null)
            position = new Position();
        return position;
    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.Position

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.