Package com.volantis.mcs.protocols.widgets.attributes

Examples of com.volantis.mcs.protocols.widgets.attributes.PopupAttributes


*/
public class PopupElement extends WidgetElement implements Dismissable {

    public PopupElement(XDIMEContextInternal context) {
        super(WidgetElements.POPUP, context);
        protocolAttributes = new PopupAttributes();
    }
View Full Code Here


        // Render open for Popup widget, which will be used internally
        // to implement behaviour of this ItemDisplay widget.
        // Generate a unique ID for the popup, so it does not clash
        // with the ID of this widget.
        popupAttributes = new PopupAttributes();
       
        popupAttributes.copy(attributes);
       
        popupAttributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
       
View Full Code Here

        return stepsJSArray.toString();
    }

    private String createCancelDialog(VolantisProtocol protocol) throws ProtocolException {
        // prepare renderer and attributes for popup widget
        PopupAttributes popupAttributes = new PopupAttributes();
        // set default styles for popup
        popupAttributes.setStyles(createCancelDialogStyles(protocol));
        // open popup
        renderWidgetOpen(protocol, popupAttributes);

        DOMOutputBuffer currentBuffer = getCurrentBuffer(protocol);

        // set default message content           
        openDivElement(protocol);
        currentBuffer.writeText(messageLocalizer
                .format("widget-wizard-cancel-dialog"));
        closeDivElement(protocol);

        // Open div for buttons
        DivAttributes divAttrs = new DivAttributes();
        divAttrs.setStyles(createCancelDialogButtonsDivStyles(protocol));
        openDivElement(protocol, divAttrs);
       
        // add first dialog button - yes
        DismissAttributes dismissAttributes = new DismissAttributes();
        dismissAttributes.setType("yes");
        dismissAttributes.setDismissableId(popupAttributes.getId());           
        // set default styles for dismis type yes
        dismissAttributes.setStyles(createCancelDialogButtonStyles(protocol));

        renderWidgetOpen(protocol, dismissAttributes);
        // TODO: should be localized
        currentBuffer.writeText("yes");
        renderWidgetClose(protocol, dismissAttributes);
        addUsedWidgetId(dismissAttributes.getId());

        // add second dialog button - no
        dismissAttributes = new DismissAttributes();
        dismissAttributes.setType("no");
        dismissAttributes.setDismissableId(popupAttributes.getId());
        // set default styles for dismis type no
        dismissAttributes.setStyles(createCancelDialogButtonStyles(protocol));

        renderWidgetOpen(protocol, dismissAttributes);
        // TODO: should be localized
        currentBuffer.writeText("no");
        renderWidgetClose(protocol, dismissAttributes);
        addUsedWidgetId(dismissAttributes.getId());

        closeDivElement(protocol);
       
        // close popup
        renderWidgetClose(protocol, popupAttributes);       
       
        return popupAttributes.getId();
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.attributes.PopupAttributes

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.