Examples of UITreeIcon


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

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIcon image = (UITreeIcon) component;
    final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
    final boolean folder = node.isFolder();
    final boolean expanded = folder && node.isExpanded();

    String source;
    final String openSource;
    final String closedSource;

    final String imageUrl = (String) image.getValue();
    if (imageUrl != null) { // application image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
    } else { // theme image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
    }
View Full Code Here

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

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIcon image = (UITreeIcon) component;
    final AbstractUIData data = ComponentUtils.findAncestor(image, AbstractUIData.class);
    final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
    final boolean folder = node.isFolder();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());

    String source;
    final String openSource;
    final String closedSource;

    final String imageUrl = (String) image.getValue();
    if (imageUrl != null) { // application image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
    } else { // theme image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
    }
View Full Code Here

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

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIcon image = (UITreeIcon) component;
    final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
    final boolean folder = node.isFolder();
    final boolean expanded = folder && node.isExpanded();

    String source;
    final String openSource;
    final String closedSource;

    final String imageUrl = (String) image.getValue();
    if (imageUrl != null) { // application image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
    } else { // theme image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
    }
View Full Code Here

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

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UITreeIcon component = (UITreeIcon) 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 (value != null) {
      component.setValueExpression("value", value);
    }

    if (disabled != null) {
      if (!disabled.isLiteralText()) {
        component.setValueExpression("disabled", disabled);
      } else {
        component.setDisabled(Boolean.parseBoolean(disabled.getExpressionString()));
      }
    }
  }
View Full Code Here

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

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIcon image = (UITreeIcon) component;
    final AbstractUIData data = ComponentUtils.findAncestor(image, AbstractUIData.class);
    final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
    final boolean folder = node.isFolder();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());

    String source;
    final String openSource;
    final String closedSource;

    final String imageUrl = (String) image.getValue();
    if (imageUrl != null) { // application image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
    } else { // theme image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
    }
View Full Code Here

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

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

  @Override
  public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {

    final UITreeIcon image = (UITreeIcon) component;
    final AbstractUIData data = ComponentUtils.findAncestor(image, AbstractUIData.class);
    final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
    final boolean folder = node.isFolder();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());

    String source;
    final String openSource;
    final String closedSource;

    final String imageUrl = (String) image.getValue();
    if (imageUrl != null) { // application image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
    } else { // theme image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
    }
View Full Code Here

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

  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UITreeIcon component = (UITreeIcon) 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 (value != null) {
      component.setValueExpression("value", value);
    }

    if (disabled != null) {
      if (!disabled.isLiteralText()) {
        component.setValueExpression("disabled", disabled);
      } else {
        component.setDisabled(Boolean.parseBoolean(disabled.getExpressionString()));
      }
    }
  }
View Full Code Here

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

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

  @Override
  public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {

    final UITreeIcon image = (UITreeIcon) component;
    final AbstractUIData data = ComponentUtils.findAncestor(image, AbstractUIData.class);
    final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
    final boolean folder = node.isFolder();
    final boolean expanded = folder && data.getExpandedState().isExpanded(node.getPath());

    String source;
    final String openSource;
    final String closedSource;

    final String imageUrl = (String) image.getValue();
    if (imageUrl != null) { // application image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
    } else { // theme image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
    }
View Full Code Here

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

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIcon image = (UITreeIcon) component;
    final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
    final boolean folder = node.isFolder();
    final boolean expanded = folder && node.isExpanded();

    String source;
    final String openSource;
    final String closedSource;

    final String imageUrl = (String) image.getValue();
    if (imageUrl != null) { // application image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
    } else { // theme image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
    }
View Full Code Here

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

      = ResourceUtils.createString("image", "treeNode", "icon", "leaf", ResourceUtils.GIF);

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {

    final UITreeIcon image = (UITreeIcon) component;
    final UITreeNode node = ComponentUtils.findAncestor(image, UITreeNode.class);
    final boolean folder = node.isFolder();
    final boolean expanded = node.isExpanded();

    String source;
    final String openSource;
    final String closedSource;

    final String imageUrl = (String) image.getValue();
    if (imageUrl != null) { // application image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, imageUrl);
    } else { // theme image
      closedSource = ResourceManagerUtils.getImageWithPath(facesContext, CLOSED_FOLDER);
    }
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.