All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.primefaces.component.selectonelistbox.SelectOneListbox Maven / Gradle / Ivy
/*
* Generated, Do Not Modify
*/
/*
* Copyright 2009-2013 PrimeTek.
*
* Licensed 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.primefaces.component.selectonelistbox;
import javax.faces.component.html.HtmlSelectOneListbox;
import javax.faces.context.FacesContext;
import javax.faces.component.UINamingContainer;
import javax.el.ValueExpression;
import javax.el.MethodExpression;
import javax.faces.render.Renderer;
import java.io.IOException;
import javax.faces.component.UIComponent;
import javax.faces.event.AbortProcessingException;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import java.util.List;
import java.util.ArrayList;
import javax.faces.component.UINamingContainer;
@ResourceDependencies({
@ResourceDependency(library="primefaces", name="primefaces.css"),
@ResourceDependency(library="primefaces", name="jquery/jquery.js"),
@ResourceDependency(library="primefaces", name="primefaces.js")
})
public class SelectOneListbox extends HtmlSelectOneListbox implements org.primefaces.component.api.Widget,org.primefaces.component.api.InputHolder {
public static final String COMPONENT_TYPE = "org.primefaces.component.SelectOneListbox";
public static final String COMPONENT_FAMILY = "org.primefaces.component";
private static final String DEFAULT_RENDERER = "org.primefaces.component.SelectOneListboxRenderer";
protected enum PropertyKeys {
widgetVar
,var
,filter
,filterMatchMode
,filterFunction
,caseSensitive
,scrollHeight;
String toString;
PropertyKeys(String toString) {
this.toString = toString;
}
PropertyKeys() {}
public String toString() {
return ((this.toString != null) ? this.toString : super.toString());
}
}
public SelectOneListbox() {
setRendererType(DEFAULT_RENDERER);
}
public String getFamily() {
return COMPONENT_FAMILY;
}
public java.lang.String getWidgetVar() {
return (java.lang.String) getStateHelper().eval(PropertyKeys.widgetVar, null);
}
public void setWidgetVar(java.lang.String _widgetVar) {
getStateHelper().put(PropertyKeys.widgetVar, _widgetVar);
}
public java.lang.String getVar() {
return (java.lang.String) getStateHelper().eval(PropertyKeys.var, null);
}
public void setVar(java.lang.String _var) {
getStateHelper().put(PropertyKeys.var, _var);
}
public boolean isFilter() {
return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.filter, false);
}
public void setFilter(boolean _filter) {
getStateHelper().put(PropertyKeys.filter, _filter);
}
public java.lang.String getFilterMatchMode() {
return (java.lang.String) getStateHelper().eval(PropertyKeys.filterMatchMode, null);
}
public void setFilterMatchMode(java.lang.String _filterMatchMode) {
getStateHelper().put(PropertyKeys.filterMatchMode, _filterMatchMode);
}
public java.lang.String getFilterFunction() {
return (java.lang.String) getStateHelper().eval(PropertyKeys.filterFunction, null);
}
public void setFilterFunction(java.lang.String _filterFunction) {
getStateHelper().put(PropertyKeys.filterFunction, _filterFunction);
}
public boolean isCaseSensitive() {
return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.caseSensitive, false);
}
public void setCaseSensitive(boolean _caseSensitive) {
getStateHelper().put(PropertyKeys.caseSensitive, _caseSensitive);
}
public int getScrollHeight() {
return (java.lang.Integer) getStateHelper().eval(PropertyKeys.scrollHeight, java.lang.Integer.MAX_VALUE);
}
public void setScrollHeight(int _scrollHeight) {
getStateHelper().put(PropertyKeys.scrollHeight, _scrollHeight);
}
public static final String CONTAINER_CLASS = "ui-selectonelistbox ui-inputfield ui-widget ui-widget-content ui-corner-all";
public static final String LIST_CONTAINER_CLASS = "ui-selectlistbox-listcontainer";
public static final String LIST_CLASS = "ui-selectlistbox-list";
public static final String ITEM_CLASS = "ui-selectlistbox-item ui-corner-all";
public final static String FILTER_CONTAINER_CLASS = "ui-selectlistbox-filter-container";
public final static String FILTER_CLASS = "ui-selectlistbox-filter ui-inputfield ui-widget ui-state-default ui-corner-all";
public final static String FILTER_ICON_CLASS = "ui-icon ui-icon-search";
public String getInputClientId() {
return this.getClientId(getFacesContext()) + "_input";
}
public String getValidatableInputClientId() {
return this.getInputClientId();
}
public void setLabelledBy(String labelledBy) {
getStateHelper().put("labelledby", labelledBy);
}
public String getLabelledBy() {
return (String) getStateHelper().get("labelledby");
}
public static String[] DOM_EVENTS = {
"onchange",
"onclick",
"ondblclick"
};
public String resolveWidgetVar() {
FacesContext context = getFacesContext();
String userWidgetVar = (String) getAttributes().get("widgetVar");
if(userWidgetVar != null)
return userWidgetVar;
else
return "widget_" + getClientId(context).replaceAll("-|" + UINamingContainer.getSeparatorChar(context), "_");
}
}