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

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

// ---------- 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.UISuggest;
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.SuggestTagDeclaration}.
*/
public final class SuggestTag extends TobagoELTag {
  private static final Logger LOG = LoggerFactory.getLogger(SuggestTag.class);
  private javax.el.ValueExpression  update;
  private javax.el.ValueExpression  maximumItems;
  private javax.el.MethodExpression  suggestMethod;
  private javax.el.ValueExpression  markup;
  private javax.el.ValueExpression  totalCount;
  private javax.el.ValueExpression  minimumCharacters;
  private javax.el.ValueExpression  delay;
  private javax.el.ValueExpression  filter;

  @Override
  public String getComponentType() {
    return UISuggest.COMPONENT_TYPE;
  }
  @Override
  public String getRendererType() {
    return "Suggest";
  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UISuggest component = (UISuggest) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (update != null) {
      if (!update.isLiteralText()) {
        component.setValueExpression("update", update);
      } else {
        component.setUpdate(Boolean.parseBoolean(update.getExpressionString()));
      }
    }
    if (maximumItems != null) {
      if (!maximumItems.isLiteralText()) {
        component.setValueExpression("maximumItems", maximumItems);
      } else {
        component.setMaximumItems(Integer.parseInt(maximumItems.getExpressionString()));
      }
    }
    if (suggestMethod != null) {
      component.setSuggestMethodExpression(suggestMethod);
    }
    if (markup != null) {
      if (!markup.isLiteralText()) {
        component.setValueExpression("markup", markup);
      } else {
        component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
      }
    }
    if (totalCount != null) {
      if (!totalCount.isLiteralText()) {
        component.setValueExpression("totalCount", totalCount);
      } else {
        component.setTotalCount(Integer.parseInt(totalCount.getExpressionString()));
      }
    }
    if (minimumCharacters != null) {
      if (!minimumCharacters.isLiteralText()) {
        component.setValueExpression("minimumCharacters", minimumCharacters);
      } else {
        component.setMinimumCharacters(Integer.parseInt(minimumCharacters.getExpressionString()));
      }
    }
    if (delay != null) {
      if (!delay.isLiteralText()) {
        component.setValueExpression("delay", delay);
      } else {
        component.setDelay(Integer.parseInt(delay.getExpressionString()));
      }
    }
    if (filter != null) {
      if (!filter.isLiteralText()) {
        component.setValueExpression("filter", filter);
      } else {
        component.setFilter(org.apache.myfaces.tobago.model.SuggestFilter.parse(filter.getExpressionString()));
      }
    }
  }

  public javax.el.ValueExpression getUpdate() {
    return update;
  }

  public void setUpdate(final javax.el.ValueExpression update) {
    this.update = update;
  }

  public javax.el.ValueExpression getMaximumItems() {
    return maximumItems;
  }

  public void setMaximumItems(final javax.el.ValueExpression maximumItems) {
    this.maximumItems = maximumItems;
  }

  public javax.el.MethodExpression getSuggestMethod() {
    return suggestMethod;
  }

  public void setSuggestMethod(final javax.el.MethodExpression suggestMethod) {
    this.suggestMethod = suggestMethod;
  }

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

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

  public javax.el.ValueExpression getTotalCount() {
    return totalCount;
  }

  public void setTotalCount(final javax.el.ValueExpression totalCount) {
    this.totalCount = totalCount;
  }

  public javax.el.ValueExpression getMinimumCharacters() {
    return minimumCharacters;
  }

  public void setMinimumCharacters(final javax.el.ValueExpression minimumCharacters) {
    this.minimumCharacters = minimumCharacters;
  }

  public javax.el.ValueExpression getDelay() {
    return delay;
  }

  public void setDelay(final javax.el.ValueExpression delay) {
    this.delay = delay;
  }

  public javax.el.ValueExpression getFilter() {
    return filter;
  }

  public void setFilter(final javax.el.ValueExpression filter) {
    this.filter = filter;
  }



  @Override
  public void release() {
    super.release();
    update = null;
    maximumItems = null;
    suggestMethod = null;
    markup = null;
    totalCount = null;
    minimumCharacters = null;
    delay = null;
    filter = null;
  }
}
TOP

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

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.