Package com.volantis.mcs.papi

Examples of com.volantis.mcs.papi.MenuAttributes


                .returns(null).any();

        pageContext.setPolicyReferenceResolver(referenceResolverMock);

        // set up menu atttributes
        MenuAttributes menuAttrs = new MenuAttributes();
        final String styleClass = "styleClass";
        menuAttrs.setStyleClass(styleClass);
        final String id = "id";
        menuAttrs.setId(id);
        menuAttrs.setPane(pane);

        int result = element.elementStart(requestContext, menuAttrs);

        assertTrue("Unexpected value returned from MenuElement.  Should have" +
                "been PROCESS_ELEMENT_BODY.",
View Full Code Here


        MenuItemGroupElementImpl group = new MenuItemGroupElementImpl();
        MenuItemElementImpl epsilon = new MenuItemElementImpl();
        MenuItemElementImpl zeta = new MenuItemElementImpl();

        // Set up some attributes to pass in to the builder
        MenuAttributes menuAttributes = new MenuAttributes();
        MenuItemGroupAttributes menuItemGroupAttributes =
                                            new MenuItemGroupAttributes();


        // Test the elements - these must be called in the order expected in
View Full Code Here

            throws PAPIException {

        MarinerPageContext pageContext =
                ContextInternals.getMarinerPageContext(context);

        MenuAttributes attributes = (MenuAttributes) blockAttributes;

        // Get hold of the menu builder - this will be initialised if needed
        MenuModelBuilder builder = pageContext.getMenuBuilder();

        try {
            // Starting a new menu
            builder.startMenu();

            // Setting attributes on the menu

            // Set the pane attribute
            MenuInternals.setPane(builder, attributes.getPane(), pageContext);

            // Get the styling property values for the current element
            Styles styles = pageContext.getStylingEngine().getStyles();

            // Emulate deprecated menu styles if necessary
            useDeprecatedMenuTypes(styles, attributes.getType());

            // Store the propertyvalues for any child use
            menuProperties = styles.getPropertyValues();

            // Set the stylistic information in the model for this element.
            MenuInternals.setElementDetails(builder, attributes, styles);

            // Set the event handling
            MenuInternals.setEvents(builder, attributes, pageContext);

            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();

            // Set the prompt
            builder.setPrompt(resolver.resolveQuotedTextExpression(
                    attributes.getPrompt()));

            // Set the error message
            builder.setErrorMessage(resolver.resolveQuotedTextExpression(
                    attributes.getErrmsg()));

            // Set the help
            builder.setHelp(resolver.resolveQuotedTextExpression(
                    attributes.getHelp()));

            // Set the title
            builder.setTitle(attributes.getTitle());

            // Set the Shortcut properties.
            setShortcutPropertiesOnBuilder(pageContext, builder, styles);

            // Push this element
View Full Code Here

TOP

Related Classes of com.volantis.mcs.papi.MenuAttributes

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.