Package com.volantis.mcs.protocols.widgets

Examples of com.volantis.mcs.protocols.widgets.WidgetDefaultModule


   
    // Javadoc inherited
    public final void renderOpen(VolantisProtocol protocol, MCSAttributes attributes)
        throws ProtocolException {

        WidgetDefaultModule module = getWidgetDefaultModule(protocol);
       
        // If parent attributes is instance of JavaScriptArrayAttributes,
        // add ID of this widget to the array attributes.
        if (!module.getOuterAttributesStack().empty()) {
            MCSAttributes currentAttributes = (MCSAttributes) module.getOuterAttributesStack().peek();
       
            if (currentAttributes instanceof JavaScriptArrayAttributes) {
                if (attributes.getId() == null) {
                    attributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
                }
           
                ((JavaScriptArrayAttributes) currentAttributes).addWidget(attributes.getId());
            }
        }
       
        // Push an instance of JavaScriptContainer associated with current rendering.
        javaScriptContainersStack.push(createJavaScriptContainer(protocol));
       
        // Push supported action and property names for this widget.
        pushWidgetId(protocol, attributes);
       
        // Push attributes on the outer stack.
        module.getOuterAttributesStack().push(attributes);

        // Invoke widget specific rendering.
        doRenderOpen(protocol, attributes);

        // Push attributes on the inner stack.
        module.getInnerAttributesStack().push(attributes);
    }
View Full Code Here


    }
   
    // Javadoc inherited
    public final void renderClose(VolantisProtocol protocol, MCSAttributes attributes)
        throws ProtocolException {
        WidgetDefaultModule module = getWidgetDefaultModule(protocol);

        // Pop attributes from the inner stack.
        module.getInnerAttributesStack().pop();

        // Invoke widget specific rendering.
        doRenderClose(protocol, attributes);
       
        // Pop attributes from the outer stack.
        module.getOuterAttributesStack().pop();

        // Pop supported action and property names for this widget.
        popWidgetId(protocol, attributes);

        // Pops an instance of JavaScriptContainer associated with current rendering.
View Full Code Here

               
                attributes.setId(widgetId);
            }
        }
       
        WidgetDefaultModule module = getWidgetDefaultModule(protocol);
       
        for (int i = 0; i < actionNames.length; i++) {
            module.pushWidgetId(widgetId, actionNames[i]);           
        }

        for (int i = 0; i < propertyNames.length; i++) {
            module.pushWidgetId(widgetId, propertyNames[i]);           
        }
    }
View Full Code Here

    private void popWidgetId(VolantisProtocol protocol, MCSAttributes attributes) {
        ActionName[] actionNames = getSupportedActionNames();
       
        PropertyName[] propertyNames = getSupportedPropertyNames();

        WidgetDefaultModule module = getWidgetDefaultModule(protocol);

        for (int i = 0; i < actionNames.length; i++) {
            module.popWidgetId(actionNames[i]);           
        }

        for (int i = 0; i < propertyNames.length; i++) {
            module.popWidgetId(propertyNames[i]);           
        }
    }
View Full Code Here

     * @throws ProtocolException
     */   
    public void doRenderOpen(VolantisProtocol protocol, MCSAttributes attributes)
            throws ProtocolException {

        WidgetDefaultModule module = getWidgetDefaultModule(protocol);
       
        buttonAttributes = new ButtonAttributes();
      
        buttonAttributes.copy(attributes);
       
        final String widgetId = module.getCurrentWidgetId(actionName);
       
        buttonAttributes.setActionReference(new ActionReferenceImpl(widgetId, referenceMemberNames));

        module.getWidgetRenderer(buttonAttributes)
            .renderOpen(protocol, buttonAttributes);
    }
View Full Code Here

        }

        // Add this field to the current multiple validator instance.
        FieldAttributes fieldAttributes = (FieldAttributes) attributes;

        WidgetDefaultModule widgetModule = (WidgetDefaultModule) protocol.getWidgetModule();
       
        MultipleValidatorBuilder builder = widgetModule.getMultipleValidatorBuilder();

        MultipleValidator validator = builder.getCurrentMultipleValidator();

        if (validator != null) {
            validator.addField(fieldAttributes);
View Full Code Here

            currentBuffer.openStyledElement("span", styles);

        } else {
            // This is rendering code multiple validator.

            WidgetDefaultModule widgetModule = (WidgetDefaultModule) protocol.getWidgetModule();

            MultipleValidatorBuilder builder = widgetModule.getMultipleValidatorBuilder();

            MultipleValidator validator = builder.getCurrentMultipleValidator();

            validator.setSourceURL(validateAttributes.getSrc());
View Full Code Here

            // Close script element.
            closeScriptElement(currentBuffer);           
           
            // Register this validator widget in the possible enclosing wizard
            // widget.
            WidgetDefaultModule widgetModule =
                (WidgetDefaultModule) protocol.getWidgetModule();

            WizardDefaultRenderer wizardRenderer =
                (WizardDefaultRenderer) widgetModule.getWizardRenderer();

            if (wizardRenderer != null) {
                wizardRenderer.renderRegisterSimpleValidator(protocol, validateAttributes.getId());
            }
        }
View Full Code Here

     * @throws ProtocolException
     */   
    public void doRenderOpen(VolantisProtocol protocol, MCSAttributes attributes)
            throws ProtocolException {

        WidgetDefaultModule module = getWidgetDefaultModule(protocol);
       
        propertyDisplayAttributes = new DisplayAttributes();
       
        propertyDisplayAttributes.copy(attributes);

        if (propertyDisplayAttributes.getId() == null) {
            propertyDisplayAttributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
        }
       
        final String widgetId = module.getCurrentWidgetId(propertyName);
       
        propertyDisplayAttributes.setPropertyReference(
                new PropertyReferenceImpl(widgetId, referenceMemberNames));
       
        module.getWidgetRenderer(propertyDisplayAttributes)
            .renderOpen(protocol, propertyDisplayAttributes);
    }
View Full Code Here

        // Add new Multiple Validator instance to the builder.
        MultipleValidatorAttributes validatorAttributes = (MultipleValidatorAttributes) attributes;

        // This should never be null and should cast properly.
        WidgetDefaultModule widgetModule = (WidgetDefaultModule) protocol.getWidgetModule();
       
        MultipleValidatorBuilder builder = widgetModule.getMultipleValidatorBuilder();

        builder.addMultipleValidator(validatorAttributes);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.WidgetDefaultModule

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.