Examples of FormatReference


Examples of com.volantis.mcs.protocols.FormatReference

    /**
     * Make sure that things work correctly when no indices are specified and
     * the pane is iterated
     */
    public void testParsePaneNoIndicesSpecified() {
        FormatReference fr;
        String paneName = "beer";
        pane.setDimensions(1);
        fr = FormatReferenceParser.parsePane(paneName, context);
        assertEquals("stem not as",
                     "beer",
                     fr.getStem());
        assertEquals("instance not as",
                     new NDimensionalIndex(new int[1], 0),
                     fr.getIndex());
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

            String paneName = originalPaneName;
            if ((paneName == null) && (form != null)) {
                paneName = form.getDefaultPane().getName();
            }

            FormatReference formatRef = FormatReferenceParser.parsePane(
                    paneName, pageContext);
            Pane pane = pageContext.getPane(formatRef.getStem());
            if (pane != null) {
                // We have the associated pane to use. Now get the zeroth
                // instance.
                result = (AbstractPaneInstance) pageContext.getFormatInstance(
                        pane, formatRef.getIndex());
            }

            // If this field is not being rendered inline then make sure that
            // the pane instance is in the current form, if it is not then
            // ignore it.
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

            FormInstance form = (FormInstance) formAttributes.getFormData();
            pane = ((Form) form.getFormat()).getDefaultPane();
            paneName = pane.getName();
        }

        FormatReference formatRef =
                FormatReferenceParser.parsePane(paneName, pageContext);
        NDimensionalIndex paneIndex = formatRef.getIndex();

        if (null == pane) {
            // get hold of the Pane via it's FormatReference
            pane = pageContext.getPane(formatRef.getStem());
            if (null == pane) {
                // nothing to do, skip both the content and the end tag
                skipEndTag = true;
                return SKIP_ELEMENT_BODY;
            }
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

    //    Methods required to implement XFormEmulatingPageContext
    //========================================================================

    // Javadoc inherited.
    public FormatReference getFormatReference(String name, int[] indeces) {
        return new FormatReference(
                name,
                createIndex(name, indeces, FormatNamespace.CONTAINER));
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

    }

    // Javadoc inherited.
    public FormatReference getFormatReference(
            String name, int[] indeces, FormatNamespace namespace) {
        return new FormatReference(
                name,
                createIndex(name, indeces, namespace));
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

            // Emulating behaviour for BlockAttributes and panes
            if (paneName != null) {
                // Try and find the pane with the specified name, if it could
                // not be found then return and skip the element body.
                FormatReference formatRef =
                        FormatReferenceParser.parsePane(paneName, pageContext);
                Pane pane = pageContext.getPane(formatRef.getStem());

                if (pane == null) {
                    skipped = true;
                    return SKIP_ELEMENT_BODY;
                }
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

            logger.error("region-name-missing");
            throw new PAPIException(
                    exceptionLocalizer.format("region-name-missing"));
        }

        FormatReference formatRef =
                FormatReferenceParser.parse(regionName, pageContext);
        Region region = pageContext.getRegion(formatRef.getStem());
        NDimensionalIndex regionIndex = formatRef.getIndex();

        if (region == null) {
            logger.info("region-missing", new Object[]{attributes.getName()});
            skipped = true;
            return SKIP_ELEMENT_BODY;
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

        // Try and find the pane with the specified name, if it could not be
        // found then return and skip the element body.
        String paneName = attributes.getPane();
        if (paneName != null) {
            FormatReference formatRef =
                    FormatReferenceParser.parsePane(paneName, pageContext);
            Pane pane = pageContext.getPane(formatRef.getStem());
            NDimensionalIndex paneIndex = formatRef.getIndex();

            if (pane == null) {
                skipped = true;
                return SKIP_ELEMENT_BODY;
            }
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

    // javadoc inherited
    public MenuBuffer getMenuBuffer(MenuEntry entry) {
        // Determine the format reference that should be used for the given
        // entry
        FormatReference formatReference = findFormatReferenceFor(entry);
        MenuBuffer menuBuffer = null;

        // Look to see if the format reference is already associated with
        // a menu buffer (the format reference could be null)
        menuBuffer = (MenuBuffer) menuBuffers.get(formatReference);
View Full Code Here

Examples of com.volantis.mcs.protocols.FormatReference

     * @param entry the menu entry for which the pane format reference is to be
     *              obtained. May not be null
     * @return the pane format reference for the menu entry, or null
     */
    protected FormatReference findFormatReferenceFor(MenuEntry entry) {
        FormatReference reference = null;

        if (entry == null) {
            throw new IllegalArgumentException("entry may not be null");
        }

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.