Examples of XFOptionAttributes


Examples of com.volantis.mcs.papi.XFOptionAttributes

        xfSingleSelectElement.elementStart(requestContext,
                xfSingleSelectAttributes);
        pageContext.setCurrentElement(xfSingleSelectElement);

        // set up xfoption element
        XFOptionAttributes xfOptionsAttrs = new XFOptionAttributes();
        final String styleClass = "styleClass";
        xfOptionsAttrs.setStyleClass(styleClass);
        final String id = "id";
        xfOptionsAttrs.setId(id);
        xfOptionsAttrs.setCaption("testCaption");
        xfOptionsAttrs.setCaptionClass("testCaptionClass");
        final XFOptionElementImpl element =
                (XFOptionElementImpl) createTestablePAPIElement();

        final int result = element.elementStart(requestContext, xfOptionsAttrs);
View Full Code Here

Examples of com.volantis.mcs.papi.XFOptionAttributes

            throws PAPIException {

        MarinerPageContext pageContext
                = ContextInternals.getMarinerPageContext(context);

        XFOptionAttributes attributes = (XFOptionAttributes) papiAttributes;

        // Create a new protocol attributes object every time, as this element
        // could be reused before the attributes have actually been finished with
        // by the protocol.
        com.volantis.mcs.protocols.SelectOption pattributes
                = new com.volantis.mcs.protocols.SelectOption();

        // Copy the base attributes.
        pattributes.setId(attributes.getId());
        pattributes.setTagName("xfoption");

        // get styles for the current element and set it on the MCSAttributes
        final StylingEngine stylingEngine = pageContext.getStylingEngine();
        pattributes.setStyles(stylingEngine.getStyles());

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        TextAssetReference object;
        // Process the caption as a mariner expression.
        object = resolver.resolveQuotedTextExpression(attributes.getCaption());
        pattributes.setCaption(object);

        // Process the prompt as a mariner expression.
        object = resolver.resolveQuotedTextExpression(attributes.getPrompt());
        pattributes.setPrompt(object);

        // Set the value attribute.
        pattributes.setValue(attributes.getValue());

        // Find the caption pane
        PaneInstance captionPaneInstance = getPaneInstance(
                pageContext, attributes.getCaptionPane());

        if ((captionPaneInstance != null) &&
                (captionPaneInstance.getFormat() != null)) {
            pattributes.setCaptionContainerInstance(captionPaneInstance);
        }

        // And the entry pane
        PaneInstance entryPaneInstance = getPaneInstance(
                pageContext, attributes.getEntryPane());

        if ((entryPaneInstance != null) &&
                (entryPaneInstance.getFormat() != null)) {
            pattributes.setEntryContainerInstance(entryPaneInstance);
        }

        // Set the styles for the caption
        final String captionClass = attributes.getCaptionClass();
        if (captionClass != null) {
            final String namespace = XDIMESchemata.CDM_NAMESPACE;
            final PAPIAttributes genericAttributes =
                    attributes.getGenericAttributes();
            genericAttributes.setAttributeValue(null, "class", captionClass);
            stylingEngine.startElement(namespace, "xfoption",
                    (Attributes) genericAttributes);
            pattributes.setCaptionStyles(stylingEngine.getStyles());
            stylingEngine.endElement(namespace, "xfoption");
        }

        // Set the selected attribute
        String selected = attributes.getSelected();
        if (selected != null) {
            boolean isSelected = new Boolean(selected).booleanValue();
            pattributes.setSelected(isSelected);
        }
View Full Code Here

Examples of com.volantis.mcs.papi.XFOptionAttributes

    private MarinerServletRequestContext requestContext;
   
    /** Creates new VolantisInputTag */
    public VolantisOptionTag() {
        super();
        optionAttributes = new XFOptionAttributes();
    }
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.