Package org.apache.myfaces.tobago.internal.taglib

Source Code of org.apache.myfaces.tobago.internal.taglib.LinkTag

// ---------- Attention: Generated code, please do not modify! ----------- 

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.myfaces.tobago.internal.taglib;

import javax.faces.application.Application;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import org.apache.commons.lang.StringUtils;
import org.apache.myfaces.tobago.component.UILink;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* JSP Tag class, generated from template {@code tag1.2.stg} with class
* {@link org.apache.myfaces.tobago.internal.taglib.component.LinkTagDeclaration}.
*/
public final class LinkTag extends TobagoELTag {
  private static final Logger LOG = LoggerFactory.getLogger(LinkTag.class);
  private javax.el.MethodExpression  actionListener;
  private javax.el.ValueExpression  accessKey;
  private javax.el.ValueExpression  markup;
  private javax.el.ValueExpression  link;
  private javax.el.ValueExpression  labelWithAccessKey;
  private javax.el.ValueExpression  tabIndex;
  private javax.el.ValueExpression  tip;
  private javax.el.ValueExpression  inline;
  private javax.el.MethodExpression  action;
  private javax.el.ValueExpression  resource;
  private javax.el.ValueExpression  jsfResource;
  private javax.el.ValueExpression  transition;
  private javax.el.ValueExpression  image;
  private javax.el.ValueExpression  label;
  private javax.el.ValueExpression  immediate;
  private javax.el.ValueExpression  renderedPartially;
  private javax.el.ValueExpression  target;
  private javax.el.ValueExpression  onclick;
  private javax.el.ValueExpression  disabled;

  @Override
  public String getComponentType() {
    return UILink.COMPONENT_TYPE;
  }
  @Override
  public String getRendererType() {
    return "Link";
  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UILink component = (UILink) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (actionListener != null) {
      component.addActionListener(new javax.faces.event.MethodExpressionActionListener(actionListener));
    }
    if (accessKey != null) {
      if (!accessKey.isLiteralText()) {
        component.setValueExpression("accessKey", accessKey);
      } else {
        component.setAccessKey(accessKey.getExpressionString().charAt(0));
      }
    }
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (link != null) {
      component.setValueExpression("link", link);
    }

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

    if (tabIndex != null) {
      if (!tabIndex.isLiteralText()) {
        component.setValueExpression("tabIndex", tabIndex);
      } else {
        component.setTabIndex(Integer.parseInt(tabIndex.getExpressionString()));
      }
    }
    if (tip != null) {
      component.setValueExpression("tip", tip);
    }

    if (inline != null) {
      if (!inline.isLiteralText()) {
        component.setValueExpression("inline", inline);
      } else {
        component.setInline(Boolean.parseBoolean(inline.getExpressionString()));
      }
    }
    if (action != null) {
      component.setActionExpression(action);
    }
    if (resource != null) {
      component.setValueExpression("resource", resource);
    }

    if (jsfResource != null) {
      if (!jsfResource.isLiteralText()) {
        component.setValueExpression("jsfResource", jsfResource);
      } else {
        component.setJsfResource(Boolean.parseBoolean(jsfResource.getExpressionString()));
      }
    }
    if (transition != null) {
      if (!transition.isLiteralText()) {
        component.setValueExpression("transition", transition);
      } else {
        component.setTransition(Boolean.parseBoolean(transition.getExpressionString()));
      }
    }
    if (image != null) {
      component.setValueExpression("image", image);
    }

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

    if (immediate != null) {
      if (!immediate.isLiteralText()) {
        component.setValueExpression("immediate", immediate);
      } else {
        component.setImmediate(Boolean.parseBoolean(immediate.getExpressionString()));
      }
    }
    if (renderedPartially != null) {
      if (!renderedPartially.isLiteralText()) {
        component.setValueExpression("renderedPartially", renderedPartially);
      } else {
        component.setRenderedPartially(splitList(renderedPartially.getExpressionString()));
      }
    }
    if (target != null) {
      component.setValueExpression("target", target);
    }

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

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

  public javax.el.MethodExpression getActionListener() {
    return actionListener;
  }

  public void setActionListener(final javax.el.MethodExpression actionListener) {
    this.actionListener = actionListener;
  }

  public javax.el.ValueExpression getAccessKey() {
    return accessKey;
  }

  public void setAccessKey(final javax.el.ValueExpression accessKey) {
    this.accessKey = accessKey;
  }

  public javax.el.ValueExpression getMarkup() {
    return markup;
  }

  public void setMarkup(final javax.el.ValueExpression markup) {
    this.markup = markup;
  }

  public javax.el.ValueExpression getLink() {
    return link;
  }

  public void setLink(final javax.el.ValueExpression link) {
    this.link = link;
  }

  public javax.el.ValueExpression getLabelWithAccessKey() {
    return labelWithAccessKey;
  }

  public void setLabelWithAccessKey(final javax.el.ValueExpression labelWithAccessKey) {
    this.labelWithAccessKey = labelWithAccessKey;
  }

  public javax.el.ValueExpression getTabIndex() {
    return tabIndex;
  }

  public void setTabIndex(final javax.el.ValueExpression tabIndex) {
    this.tabIndex = tabIndex;
  }

  public javax.el.ValueExpression getTip() {
    return tip;
  }

  public void setTip(final javax.el.ValueExpression tip) {
    this.tip = tip;
  }

  public javax.el.ValueExpression getInline() {
    return inline;
  }

  public void setInline(final javax.el.ValueExpression inline) {
    this.inline = inline;
  }

  public javax.el.MethodExpression getAction() {
    return action;
  }

  public void setAction(final javax.el.MethodExpression action) {
    this.action = action;
  }

  public javax.el.ValueExpression getResource() {
    return resource;
  }

  public void setResource(final javax.el.ValueExpression resource) {
    this.resource = resource;
  }

  public javax.el.ValueExpression getJsfResource() {
    return jsfResource;
  }

  public void setJsfResource(final javax.el.ValueExpression jsfResource) {
    this.jsfResource = jsfResource;
  }

  public javax.el.ValueExpression getTransition() {
    return transition;
  }

  public void setTransition(final javax.el.ValueExpression transition) {
    this.transition = transition;
  }

  public javax.el.ValueExpression getImage() {
    return image;
  }

  public void setImage(final javax.el.ValueExpression image) {
    this.image = image;
  }

  public javax.el.ValueExpression getLabel() {
    return label;
  }

  public void setLabel(final javax.el.ValueExpression label) {
    this.label = label;
  }

  public javax.el.ValueExpression getImmediate() {
    return immediate;
  }

  public void setImmediate(final javax.el.ValueExpression immediate) {
    this.immediate = immediate;
  }

  public javax.el.ValueExpression getRenderedPartially() {
    return renderedPartially;
  }

  public void setRenderedPartially(final javax.el.ValueExpression renderedPartially) {
    this.renderedPartially = renderedPartially;
  }

  public javax.el.ValueExpression getTarget() {
    return target;
  }

  public void setTarget(final javax.el.ValueExpression target) {
    this.target = target;
  }

  public javax.el.ValueExpression getOnclick() {
    return onclick;
  }

  public void setOnclick(final javax.el.ValueExpression onclick) {
    this.onclick = onclick;
  }

  public javax.el.ValueExpression getDisabled() {
    return disabled;
  }

  public void setDisabled(final javax.el.ValueExpression disabled) {
    this.disabled = disabled;
  }



  @Override
  public void release() {
    super.release();
    actionListener = null;
    accessKey = null;
    markup = null;
    link = null;
    labelWithAccessKey = null;
    tabIndex = null;
    tip = null;
    inline = null;
    action = null;
    resource = null;
    jsfResource = null;
    transition = null;
    image = null;
    label = null;
    immediate = null;
    renderedPartially = null;
    target = null;
    onclick = null;
    disabled = null;
  }
}
TOP

Related Classes of org.apache.myfaces.tobago.internal.taglib.LinkTag

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.