Examples of ContainerInstance


Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

        labelsTrElem.setAttribute("style", "height: 1px");

        setElementLocked(protocol, labelsTrElem);

        // get main RegionInstance
        ContainerInstance containingInstance = context.getPageContext()
                .getCurrentContainerInstance();

        containingInstance.getCurrentBuffer().transferContentsFrom(
                getLabelsRegionInstance().getCurrentBuffer());
       
        renderTabStripFiller(mainBuffer);
        // Increase colspan for tab strip filler
        context.addColspan(1);

        // Close labels tr
        mainBuffer.closeElement("tr");

        // Create tr element for contents in main buffer               
        Element contentsTrElem = mainBuffer.openStyledElement("tr", contentsTrStyle);
       
        contentsTrElem.setAttribute("id", protocol.getMarinerPageContext()
                .generateUniqueFCID());
        setElementLocked(protocol, contentsTrElem);

        // Create td element with proper style
        Styles contentsTdStyle = StylingFactory.getDefaultInstance()
          .createInheritedStyles(
                 protocol.getMarinerPageContext().getStylingEngine()           
            .getStyles(), DisplayKeywords.TABLE_CELL);
       
        Element contentsTdElem = mainBuffer.openStyledElement("td",
                contentsTdStyle);
        String contentId = protocol.getMarinerPageContext()
                .generateUniqueFCID();
        context.setContentId(contentId);
        contentsTdElem.setAttribute("id", contentId);
        contentsTdElem.setAttribute("colspan", "" + context.getColspan());
        setElementLocked(protocol, contentsTdElem);
        contentsTdElem.getStyles().getPropertyValues()
                .setComputedAndSpecifiedValue(
                        StylePropertyDetails.VERTICAL_ALIGN,
                        VerticalAlignKeywords.TOP);

        // Insert tab contents buffer to main buffer
        // mainBuffer.addOutputBuffer(tabsBuffer);

        // pop tab's contents deviceLayoutContext
        DeviceLayoutContext contentsLayoutToPop = context.getPageContext()
                .getDeviceLayoutContext();
        RegionContent contentsRegionContent = new DeviceLayoutRegionContent(
                contentsLayoutToPop);
        context.getPageContext().popDeviceLayoutContext();

        // add contentsRegionContent to main RegionInstance
        containingInstance.getCurrentBuffer().transferContentsFrom(
                getContentsRegionInstance().getCurrentBuffer());

        // Close contents tr element
        mainBuffer.closeElement("td");
        mainBuffer.closeElement("tr");
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

                    }
                }
            }
            // NOTE: old menu code is unused.
            //    Initialise the content buffer.
            ContainerInstance containerInstance = (ContainerInstance)
                context.getFormatInstance(pane,
                    NDimensionalIndex.ZERO_DIMENSIONS);
            DOMOutputBuffer dom =
                (DOMOutputBuffer) containerInstance.getCurrentBuffer();
            doMenu(dom, attributes, orientation, iterator != null);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

            if (needsBufferPerItem) {

                // We don't do separators in this case
                Pane pane = attributes.getPane();
                // NOTE: old menu code is unused
                ContainerInstance containerInstance =
                        (ContainerInstance) context.getFormatInstance(
                                pane, NDimensionalIndex.ZERO_DIMENSIONS);
                containerInstance.endCurrentBuffer();
                context.popOutputBuffer(buffer);
                buffer = (DOMOutputBuffer) containerInstance.getCurrentBuffer();
                context.pushOutputBuffer(buffer);
            }
        }
        if (emulateMenu && !needsBufferPerItem) {
            closeMenu(buffer, attributes);
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

     * @param pane the pane used to obtain the DOMOutputBuffer.
     * @return the current DOMOutputBuffer from the pane.
     * @deprecated use {@link #getCurrentBuffer(ContainerInstance)} instead.
     */
    protected DOMOutputBuffer getCurrentBuffer(Pane pane) {
      ContainerInstance containerInstance = (ContainerInstance)
            context.getDeviceLayoutContext().getCurrentFormatInstance(pane);
        return (DOMOutputBuffer) containerInstance.getCurrentBuffer();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

    public final void doActionInput(XFActionAttributes attributes)
            throws ProtocolException {

        DOMOutputBuffer dom;
        ContainerInstance containerInstance;

        // If the entry pane is not set then return as there is nothing
        // else we can do.
        if ((containerInstance = attributes.getEntryContainerInstance()) == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Entry pane instance not set");
            }
            return;
        }

        // Direct the markup to the entry panes content buffer.
        dom = (DOMOutputBuffer) containerInstance.getCurrentBuffer();

        // Generate the markup for the action.
        doActionInput(dom, attributes);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

     * @throws ProtocolException if there was a problem writing the caption.
     */
    protected void writeCaption(XFFormFieldAttributes attributes)
            throws ProtocolException {

        ContainerInstance captionContainerInstance =
                attributes.getCaptionContainerInstance();
        ContainerInstance entryContainerInstance =
                attributes.getEntryContainerInstance();
        String value = getPlainText(attributes.getCaption());

        // If the caption container instance is null, then output to the entry
        // container instance.
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

        PropertyValues propertyValues = styles.getPropertyValues();

        // Initialise the content buffer.
        Pane pane = attributes.getPane();
        // NOTE: old menu code is unused.
        ContainerInstance containerInstance =
                (ContainerInstance) context.getFormatInstance(pane,
                        NDimensionalIndex.ZERO_DIMENSIONS);
        DOMOutputBuffer dom = (DOMOutputBuffer)
                containerInstance.getCurrentBuffer();

        Element menu = dom.openStyledElement("menu", attributes);

        // Add the id attribute if there is one.
        String id = attributes.getId();
        if (id != null) {
            menu.setAttribute("id", id);
        }

        StyleValue styleValue;
        styleValue = propertyValues.getComputedValue(
                StylePropertyDetails.MCS_AURAL_MENU_SCOPE);
        String scope = styleValue.getStandardCSS();
        menu.setAttribute("scope", scope);

        styleValue = propertyValues.getComputedValue(
                StylePropertyDetails.MCS_AURAL_DTMF_ALLOCATION);
        boolean manualDTMF = styleValue == MCSAuralDTMFAllocationKeywords.MANUAL;
        if (!manualDTMF) {
            menu.setAttribute("dtmf", "true");
        }
        attributes.setManualDTMF(manualDTMF);

        // Add the prompt markup.
        TextAssetReference object = attributes.getPrompt();
        if (object != null) {
            String prompt =
                    getTextFromReference(object, TextEncoding.VOICE_XML_PROMPT);
            if (prompt != null) {
                Element element = createElementFromString(prompt);
                dom.addElement(element);
            }
        }

        boolean isIteratorPane = false;
        if (pane instanceof RowIteratorPane) {
            isIteratorPane = true;
        } else if (pane instanceof ColumnIteratorPane) {
            isIteratorPane = true;
        }

        // Add the menu items.
        Collection items = attributes.getItems();
        for (Iterator i = items.iterator(); i.hasNext();) {

            ((MenuChildVisitable) i.next()).visit(
                    this, dom, attributes,i.hasNext(), isIteratorPane,
                    MenuOrientation.HORIZONTAL);
            // The pane is an iterator pane which matches the orientation
            // required for the menu so each menu item goes in its own buffer.
            // End the current buffer and then get the next buffer.
            containerInstance.endCurrentBuffer();
            dom = (DOMOutputBuffer) containerInstance.getCurrentBuffer();
        }

        // Add the help markup
        object = attributes.getHelp();
        if (object != null) {
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

    }

    public void doTextInput(XFTextInputAttributes attributes) {

        DOMOutputBuffer dom;
        ContainerInstance entryContainerInstance;

        // If the entry container Instance is not set then return as there is
        // nothing else we can do.
        if ((entryContainerInstance =
                attributes.getEntryContainerInstance()) == null) {
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

    // javadoc inherited
    public void doBooleanInput(XFBooleanAttributes attributes) {

        DOMOutputBuffer dom;
        ContainerInstance entryContainerInstance;
        String name;

        // If the entry ContainerInstance is not set then return as there is
        // nothing else we can do.
        if ((entryContainerInstance =
View Full Code Here

Examples of com.volantis.mcs.protocols.layouts.ContainerInstance

    }

    private void doSingleSelectInput(XFSelectAttributes attributes) {

        DOMOutputBuffer dom;
        ContainerInstance entryContainerInstance;
        String name;

        // If the entry ContainerInstance is not set then return as there is
        // nothing else we can do.
        if ((entryContainerInstance =
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.