Package org.apache.myfaces.tobago.component

Examples of org.apache.myfaces.tobago.component.UIImage


  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIImage component = (UIImage) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

    if (height != null) {
      if (!height.isLiteralText()) {
        component.setValueExpression("height", height);
      } else {
        component.setHeight(org.apache.myfaces.tobago.layout.Measure.valueOf(height.getExpressionString()));
      }
    }
    if (alt != null) {
      component.setValueExpression("alt", alt);
    }

    if (value != null) {
      component.setValueExpression("value", value);
    }

    if (border != null) {
      component.setValueExpression("border", border);
    }

    if (width != null) {
      if (!width.isLiteralText()) {
        component.setValueExpression("width", width);
      } else {
        component.setWidth(org.apache.myfaces.tobago.layout.Measure.valueOf(width.getExpressionString()));
      }
    }
    if (disabled != null) {
      if (!disabled.isLiteralText()) {
        component.setValueExpression("disabled", disabled);
      } else {
        component.setDisabled(Boolean.parseBoolean(disabled.getExpressionString()));
      }
    }
  }
View Full Code Here


    buttonPanel.onComponentPopulated(facesContext, parent);

    // create image
    // check the id: its might be better not calling createUniqueId
    final String imageId = linkId != null ? linkId + "image" : facesContext.getViewRoot().createUniqueId();
    final UIImage image = (UIImage) CreateComponentUtils.createComponent(
        facesContext, UIImage.COMPONENT_TYPE, RendererTypes.IMAGE, imageId);
    image.setRendered(true);
    image.setValue("image/date.gif");
    image.setAlt(""); //TODO: i18n (write a text)
    StyleClasses.ensureStyleClasses(image).addFullQualifiedClass("tobago-datePicker-icon");
    picker.getChildren().add(image);
  }
View Full Code Here

    buttonPanel.onComponentPopulated(facesContext, parent);

    // create image
    // check the id: its might be better not calling createUniqueId
    final String imageId = linkId != null ? linkId + "image" : facesContext.getViewRoot().createUniqueId();
    final UIImage image = (UIImage) CreateComponentUtils.createComponent(
        facesContext, UIImage.COMPONENT_TYPE, RendererTypes.IMAGE, imageId);
    image.setRendered(true);
    image.setValue("image/date.gif");
    image.setAlt(""); //TODO: i18n (write a text)
    StyleClasses.ensureStyleClasses(image).addFullQualifiedClass("tobago-datePicker-icon");
    picker.getChildren().add(image);
  }
View Full Code Here

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIImage component = (UIImage) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

    if (height != null) {
      if (!height.isLiteralText()) {
        component.setValueExpression("height", height);
      } else {
        component.setHeight(org.apache.myfaces.tobago.layout.Measure.valueOf(height.getExpressionString()));
      }
    }
    if (alt != null) {
      component.setValueExpression("alt", alt);
    }

    if (value != null) {
      component.setValueExpression("value", value);
    }

    if (border != null) {
      component.setValueExpression("border", border);
    }

    if (width != null) {
      if (!width.isLiteralText()) {
        component.setValueExpression("width", width);
      } else {
        component.setWidth(org.apache.myfaces.tobago.layout.Measure.valueOf(width.getExpressionString()));
      }
    }
    if (disabled != null) {
      if (!disabled.isLiteralText()) {
        component.setValueExpression("disabled", disabled);
      } else {
        component.setDisabled(Boolean.parseBoolean(disabled.getExpressionString()));
      }
    }
  }
View Full Code Here

    buttonPanel.onComponentPopulated(facesContext, parent);

    // create image
    // check the id: its might be better not calling createUniqueId
    final String imageId = linkId != null ? linkId + "image" : facesContext.getViewRoot().createUniqueId();
    final UIImage image = (UIImage) CreateComponentUtils.createComponent(
        facesContext, UIImage.COMPONENT_TYPE, RendererTypes.IMAGE, imageId);
    image.setRendered(true);
    image.setValue("image/date.gif");
    image.setAlt(""); //TODO: i18n (write a text)
    StyleClasses.ensureStyleClasses(image).addFullQualifiedClass("tobago-datePicker-icon");
    picker.getChildren().add(image);
  }
View Full Code Here

    buttonPanel.onComponentPopulated(facesContext, parent);

    // create image
    // check the id: its might be better not calling createUniqueId
    final String imageId = linkId != null ? linkId + "image" : facesContext.getViewRoot().createUniqueId();
    final UIImage image = (UIImage) CreateComponentUtils.createComponent(
        facesContext, UIImage.COMPONENT_TYPE, RendererTypes.IMAGE, imageId);
    image.setRendered(true);
    image.setValue("image/date.gif");
    image.setAlt(""); //TODO: i18n (write a text)
    StyleClasses.ensureStyleClasses(image).addFullQualifiedClass("tobago-datePicker-icon");
    picker.getChildren().add(image);
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.component.UIImage

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.