// ---------- 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.myfaces.tobago.component.UISelectItems;
import org.apache.myfaces.tobago.internal.util.StringUtils;
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.SelectItemsTagDeclaration}.
*/
public final class SelectItemsTag extends TobagoELTag {
private static final Logger LOG = LoggerFactory.getLogger(SelectItemsTag.class);
private javax.el.ValueExpression itemValue;
private javax.el.ValueExpression itemLabel;
private String var;
private javax.el.ValueExpression value;
private javax.el.ValueExpression tip;
private javax.el.ValueExpression itemImage;
private javax.el.ValueExpression itemDisabled;
@Override
public String getComponentType() {
return UISelectItems.COMPONENT_TYPE;
}
@Override
public String getRendererType() {
return null;
}
@Override
protected void setProperties(final UIComponent uiComponent) {
super.setProperties(uiComponent);
final UISelectItems component = (UISelectItems) uiComponent;
final FacesContext context = FacesContext.getCurrentInstance();
final Application application = context.getApplication();
if (itemValue != null) {
component.setValueExpression("itemValue", itemValue);
}
if (itemLabel != null) {
component.setValueExpression("itemLabel", itemLabel);
}
if (var != null) {
component.setVar(var);
}
if (value != null) {
if (!value.isLiteralText()) {
component.setValueExpression("value", value);
/*} else {
component.setValue(value.getExpressionString());*/
}
}
if (tip != null) {
component.setValueExpression("tip", tip);
}
if (itemImage != null) {
component.setValueExpression("itemImage", itemImage);
}
if (itemDisabled != null) {
if (!itemDisabled.isLiteralText()) {
component.setValueExpression("itemDisabled", itemDisabled);
} else {
component.setItemDisabled(Boolean.parseBoolean(itemDisabled.getExpressionString()));
}
}
}
public javax.el.ValueExpression getItemValue() {
return itemValue;
}
public void setItemValue(final javax.el.ValueExpression itemValue) {
this.itemValue = itemValue;
}
public javax.el.ValueExpression getItemLabel() {
return itemLabel;
}
public void setItemLabel(final javax.el.ValueExpression itemLabel) {
this.itemLabel = itemLabel;
}
public String getVar() {
return var;
}
public void setVar(final String var) {
this.var = var;
}
public javax.el.ValueExpression getValue() {
return value;
}
public void setValue(final javax.el.ValueExpression value) {
this.value = value;
}
public javax.el.ValueExpression getTip() {
return tip;
}
public void setTip(final javax.el.ValueExpression tip) {
this.tip = tip;
}
public javax.el.ValueExpression getItemImage() {
return itemImage;
}
public void setItemImage(final javax.el.ValueExpression itemImage) {
this.itemImage = itemImage;
}
public javax.el.ValueExpression getItemDisabled() {
return itemDisabled;
}
public void setItemDisabled(final javax.el.ValueExpression itemDisabled) {
this.itemDisabled = itemDisabled;
}
@Override
public void release() {
super.release();
itemValue = null;
itemLabel = null;
var = null;
value = null;
tip = null;
itemImage = null;
itemDisabled = null;
}
}