/*
* xulfaces : bring XUL power to Java
*
* Copyright (C) 2005 Olivier SCHMITT
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.xulfaces.tag.listbox;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import org.xulfaces.annotation.taglib.ATTRIBUTE;
import org.xulfaces.annotation.taglib.TAG;
import org.xulfaces.tag.ModelTag;
/**
*
* @author kito31
* @version $Id$
*/
@TAG(name="dataListbox",description="Defines a list of items (see XUL listbox element).")
public class DataListBoxTag extends ModelTag {
@ATTRIBUTE(mappedType="java.lang.Boolean",description = "If this attribute is not used, the user can navigate to specific items in the list by pressing the first the first letter of the item's label.")
protected String disableKeyNavigation;
@ATTRIBUTE(description = "Connects the listbox to a corresponding preference.")
protected String preference;
@ATTRIBUTE(mappedType="java.lang.Integer",description = "The number of rows to display in the list box.")
protected String rows;
@ATTRIBUTE(description = "Used to indicate whether multiple selection is allowed.")
protected String seltype;
@ATTRIBUTE(mappedType="java.lang.Boolean",description = "If this attribue is not specified, a select event is fired whenever an item is selected, either by the user or by calling one of the select methods.")
protected String suppressonselect;
@ATTRIBUTE(mappedType="java.lang.Integer",description = "The tab order of the element.")
protected String tabindex;
@ATTRIBUTE(description="Variable name for iteration.")
private String var;
public String getComponentType() {
return "xul.component.DataListBox";
}
public String getRendererType() {
return "xul.renderer.DataListBox";
}
public String getVar() {
return var;
}
public void setVar(String var) {
this.var = var;
}
public String getDisableKeyNavigation() {
return disableKeyNavigation;
}
public void setDisableKeyNavigation(String disableKeyNavigation) {
this.disableKeyNavigation = disableKeyNavigation;
}
public String getPreference() {
return preference;
}
public void setPreference(String preference) {
this.preference = preference;
}
public String getRows() {
return rows;
}
public void setRows(String rows) {
this.rows = rows;
}
public String getSeltype() {
return seltype;
}
public void setSeltype(String seltype) {
this.seltype = seltype;
}
public String getSuppressonselect() {
return suppressonselect;
}
public void setSuppressonselect(String suppressonselect) {
this.suppressonselect = suppressonselect;
}
public String getTabindex() {
return tabindex;
}
public void setTabindex(String tabindex) {
this.tabindex = tabindex;
}
// @StartGeneration
protected void setProperties(UIComponent component) {
super.setProperties(component);
FacesContext facesContext = getFacesContext();
setBooleanAttribute(facesContext,component,"disableKeyNavigation",disableKeyNavigation);
setStringAttribute(facesContext,component,"preference",preference);
setIntegerAttribute(facesContext,component,"rows",rows);
setStringAttribute(facesContext,component,"seltype",seltype);
setBooleanAttribute(facesContext,component,"suppressonselect",suppressonselect);
setIntegerAttribute(facesContext,component,"tabindex",tabindex);
setStringAttribute(facesContext,component,"var",var);
}
// @EndGeneration
}