Package com.liferay.faces.alloy.component.button

Examples of com.liferay.faces.alloy.component.button.Button


      Icon icon = (Icon) application.createComponent(Icon.COMPONENT_TYPE);
      String buttonIconName = getButtonIconName();
      icon.setName(buttonIconName);

      // Create a button component that that is also to remain detached from the component tree.
      Button button = (Button) application.createComponent(Button.COMPONENT_TYPE);
      List<UIComponent> buttonChildren = button.getChildren();
      buttonChildren.add(icon);
      button.setDisabled(disabled);

      // If the component is enabled, then
      if (!disabled) {

        if ("button".equals(showOn)) {

          String buttonClientId = getButtonClientId(facesContext, inputDateTime);
          button.setId(buttonClientId);
        }
        else {

          // If the both the button and the input are supposed to trigger the datePicker, set the button's
          // onclick to focus and click the input.
          String onClick = BUTTON_ON_CLICK_EVENT.replace("{0}", inputClientId);
          button.setOnclick(onClick);
        }
      }

      // Invoke the button's renderer so that it renders itself and its child icon.
      button.encodeAll(facesContext);
    }

    // If the component is enabled, then create the boundingBox and contentBox of the picker.
    if (!disabled) {
View Full Code Here

TOP

Related Classes of com.liferay.faces.alloy.component.button.Button

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.