Examples of addOption()


Examples of org.openmrs.module.htmlformentry.widget.DropdownWidget.addOption()

   
    @Test
    public void dropdownWidgetShouldProduceHtml() {
        DropdownWidget dw = new DropdownWidget();
        context.registerWidget(dw);
        dw.addOption(new Option("Extra Large", "XL", false));
        dw.addOption(new Option("Large", "L", true));
        Assert.assertEquals("<select id=\"w1\" name=\"w1\"><option value=\"XL\">Extra Large</option><option value=\"L\" selected=\"true\">Large</option></select>", dw.generateHtml(context));
    }

    @Test
View Full Code Here

Examples of org.openmrs.module.htmlformentry.widget.SingleOptionWidget.addOption()

      widget = new CheckboxWidget(state.getKey(), state.getValue().getUuid());
    } else {
      SingleOptionWidget singleOption;
      if (tagParams.getType().equals("dropdown")) {
        singleOption = new DropdownWidget();
        singleOption.addOption(new Option("", "", false));
      } else {
        singleOption = new RadioButtonsWidget();
      }
     
      for (Entry<String, ProgramWorkflowState> state : states.entrySet()) {
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.impl.DefaultSAML2HandlerRequest.addOption()

            // Create the request/response
            SAML2HandlerRequest saml2HandlerRequest = new DefaultSAML2HandlerRequest(protocolContext, idpIssuer.getIssuer(),
                    samlDocumentHolder, HANDLER_TYPE.IDP);
            saml2HandlerRequest.setRelayState(relayState);
            if (StringUtil.isNotNull(loginType)) {
                saml2HandlerRequest.addOption(GeneralConstants.LOGIN_TYPE, loginType);
            }

            String assertionID = (String) session.getSession().getAttribute(GeneralConstants.ASSERTION_ID);

            // Set the options on the handler request
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.interfaces.SAML2HandlerRequest.addOption()

        // Ask the handler chain to generate the saml request

        // Create the request/response
        SAML2HandlerRequest saml2HandlerRequest = getSAML2HandlerRequest(null, httpContext);
        saml2HandlerRequest.addOption(GeneralConstants.CONTEXT_PATH, httpContext.getServletContext().getContextPath());
        saml2HandlerRequest.addOption(GeneralConstants.SUPPORTS_SIGNATURES, this.spConfiguration.isSupportsSignature());
       
        SAML2HandlerResponse saml2HandlerResponse = new DefaultSAML2HandlerResponse();

        saml2HandlerResponse.setPostBindingForResponse(postBinding);
View Full Code Here

Examples of org.primefaces.cookbook.component.LayoutOptions.addOption()

  protected void initialize() {
    layoutOptions = new LayoutOptions();

    // for all panes
    LayoutOptions panes = new LayoutOptions();
    panes.addOption("resizable", true);
    panes.addOption("closable", true);
    panes.addOption("slidable", false);
    panes.addOption("spacing", 6);
    panes.addOption("resizeWithWindow", false);
    panes.addOption("resizeWhileDragging", true);
View Full Code Here

Examples of org.richfaces.renderkit.ScriptOptions.addOption()

        }
        function.addParameter(evt);
        ScriptOptions subMenuOptions = new ScriptOptions(component);
        subMenuOptions.addEventHandler("onopen");
        subMenuOptions.addEventHandler("onclose");
        subMenuOptions.addOption("direction");
        subMenuOptions.addOption("highlightParent", Boolean.TRUE);
        function.addParameter(subMenuOptions);
        function.appendScript(buffer);

    } else {
View Full Code Here

Examples of org.springframework.xd.rest.domain.DetailedModuleDefinitionResource.addOption()

        }
        else {
          defaultValueAsString = defaultValue.toString();
        }

        result.addOption(new DetailedModuleDefinitionResource.Option(option.getName(),
            type == null ? null : type.getSimpleName(), option.getDescription(),
                defaultValueAsString, option.isHidden()));
      }
    }
    return result;
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.AddDroppable.addOption()

        // Make the draggable:
        Draggable action1 = new Draggable("draggable");
        action1.addOption("revert", true);
        // Add the droppable:
        AddDroppable action2 = new AddDroppable("droppable");
        action2.addOption("onDrop", "function(draggable, droppable) { showAlertOnDrop(draggable, droppable); }");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the actions:
        response.addAction(action1);
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Draggable.addOption()

    }
   
    public AjaxResponse enableDnD(AjaxActionEvent event) {
        // Make the draggable:
        Draggable action1 = new Draggable("draggable");
        action1.addOption("revert", true);
        // Add the droppable:
        AddDroppable action2 = new AddDroppable("droppable");
        action2.addOption("onDrop", "function(draggable, droppable) { showAlertOnDrop(draggable, droppable); }");
       
        // Create a concrete ajax response:
View Full Code Here

Examples of org.springmodules.xt.ajax.action.prototype.scriptaculous.Effect.addOption()

     * Get the default error action.<br>
     * This renders the error by highlighting it in red.
     */
    public AjaxAction[] getErrorActions(AjaxSubmitEvent event, ObjectError error){
        Effect highlight = new Effect("Highlight", error.getCode());
        highlight.addOption("startcolor", "#FF0A0A");
        return new AjaxAction[]{highlight};
    }
}
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.