Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.CaptionAwareXFFormAttributes


            if (parent instanceof XFormsControlElement ||
                    parent instanceof XFItemElementImpl) {
                // retrieve the parent's attributes... because this is the
                // label for a control or item.
                CaptionAwareXFFormAttributes attributes =
                        (CaptionAwareXFFormAttributes)
                        ((StyledXFormsElement)parent).getProtocolAttributes();
                final MarinerPageContext pageContext = getPageContext(context);
                final Styles labelStyles =
                        pageContext.getStylingEngine().getStyles();
                attributes.setCaptionStyles(labelStyles);

                // Process the caption as a mariner expression.
                final String labelText = getCharData();
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("XForms control|item label: " + labelText);
                }

                PolicyReferenceResolver resolver =
                        pageContext.getPolicyReferenceResolver();

                TextAssetReference caption =
                        resolver.resolveQuotedTextExpression(labelText);
                attributes.setCaption(caption);

                // The caption container instance will have been set to the
                // current container as part of initialising the attributes.
                final ContainerInstance captionContainer =
                        pageContext.getCurrentContainerInstance();
                attributes.setCaptionContainerInstance(captionContainer);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.CaptionAwareXFFormAttributes

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.