/*
* 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.tab;
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.XULComponentTag;
/**
*
* @author kito31
* @version $Id$
*/
@TAG(name="tabpanels",description="Defines a tabpanels (see XUL tabpanels element).")
public class TabPanelsTag extends XULComponentTag {
@ATTRIBUTE(mappedType="java.lang.Integer",description = "Gets and sets the index of the currently selected panel in the deck. The first item is at index 0.")
private String selectedIndex;
public String getComponentType() {
return "xul.component.TabPanels";
}
public String getRendererType() {
return "xul.renderer.TabPanels";
}
public String getSelectedIndex() {
return selectedIndex;
}
public void setSelectedIndex(String selectedIndex) {
this.selectedIndex = selectedIndex;
}
// @StartGeneration
protected void setProperties(UIComponent component) {
super.setProperties(component);
FacesContext facesContext = getFacesContext();
setIntegerAttribute(facesContext,component,"selectedIndex",selectedIndex);
}
// @EndGeneration
}