Examples of SegmentInstance


Examples of com.alibaba.json.test.entity.pagemodel.SegmentInstance

            String segmentId = getNextTextValue("cid", parser); // get pageId

            current = parser.nextToken(); // move to field: layouts
            assertExpectedFiled(parser.getCurrentName(), "layouts", parser.getCurrentLocation());
            SegmentInstance instance = new SegmentInstance();
            instance.setLayouts(parseLayouts(parser, segmentId));
            instances.add(instance);

            assertExpectedJsonToken((current = parser.nextToken()), JsonToken.END_OBJECT, parser.getCurrentLocation());

        }
View Full Code Here

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

        segment.setAttribute(FormatConstants.SCROLLING_ATTRIBUTE,
                             FormatConstants.SCROLLING_VALUE_YES);
        // NB: Style class should NOT be passed through for segments
        segment.setAttribute(FormatConstants.STYLE_CLASS, "rowIteratorStyle");

        SegmentInstance instance =
                (SegmentInstance) dlContext.getFormatInstance(segment,
                NDimensionalIndex.ZERO_DIMENSIONS);

        // Expected output for attributes specified above
        String expected = "<segment borderColor=\"teal\" " +
View Full Code Here

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

        if (logger.isDebugEnabled()) {
            logger.debug("Default segment is " + segment);
        }

        SegmentInstance segmentInstance
                = (SegmentInstance) context.getFormatInstance(segment,
                NDimensionalIndex.ZERO_DIMENSIONS);
        SegmentAttributes attributes = segmentInstance.getAttributes();

        if (attributes == null) {
            logger.error("segment-attributes-missing", new Object[]{name});
            return null;
        }
View Full Code Here

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

    public void render(final FormatRendererContext context, final FormatInstance instance)
            throws RendererException {
        try {
            if (!instance.isEmpty()) {
                Segment segment = (Segment)instance.getFormat();
                SegmentInstance segmentInstance = (SegmentInstance) instance;

                SegmentAttributes attributes = segmentInstance.getAttributes();

                if (logger.isDebugEnabled()) {
                    logger.debug("Segment.writeOutput() for "
                                 + attributes.getName());
                }
View Full Code Here

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

        }

        // Javadoc inherited from super class.
        public boolean visit(Segment format, Object object) {

            initialiseFormatInstance(new SegmentInstance(index), format);
            // Only visit the topmost format.
            return true;
        }
View Full Code Here

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

            logger.error("segment-not-called", new Object[]{name});
            throw new PAPIException(
                    exceptionLocalizer.format("missing-segment", name));
        }

        SegmentInstance segmentInstance
                = (SegmentInstance) pageContext.getFormatInstance(segment,
                NDimensionalIndex.ZERO_DIMENSIONS);

        // the attribute values should be set on the segment attributes retrieved
        // from the segment instance so that they can be used later.
        com.volantis.mcs.protocols.SegmentAttributes pattributes
                = segmentInstance.getAttributes();

        // Copy the core attributes.
        pattributes.setId(attributes.getId());

        // Copy the other attributes.
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.