/*
* 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.wizard;
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;
/**
* <p>Defines a wizard tag.</p>
*
* @author kito31
* @version $Id: WizardTag.java,v 1.3 2007/05/08 14:21:07 kito31 Exp $
*/
@TAG(name="wizard",description="Defines a wizard (see XUL wizard element).")
public class WizardTag extends XULComponentTag {
@ATTRIBUTE(mappedType="java.lang.Boolean",description = "True if the wizard is on the first page.")
private String firstpage;
@ATTRIBUTE(mappedType="java.lang.Boolean",description = "True if the wizard is on the last page.")
private String lastpage;
@ATTRIBUTE(supportsMethodBinding=true,description = "This should be set to code which is called when the user presses the Back button.")
private String onwizardback;
@ATTRIBUTE(supportsMethodBinding=true,description = "This should be set to code which is called when the user presses the Cancel button.")
private String onwizardcancel;
@ATTRIBUTE(supportsMethodBinding=true,description = "This should be set to code which is called when the user presses the Finish button")
private String onwizardfinish;
@ATTRIBUTE(supportsMethodBinding=true,description = "This should be set to code which is called when the user presses the Next button.")
private String onwizardnext;
@ATTRIBUTE(mappedType="java.lang.Integer",description = "The index of the current page.")
private String pagestep;
@ATTRIBUTE(description = "The title that appears at the top of the wizard. ")
private String title;
public String getRendererType() {
return "xul.renderer.Wizard";
}
public String getComponentType() {
return "xul.component.Wizard";
}
public String getFirstpage() {
return firstpage;
}
public void setFirstpage(String firstpage) {
this.firstpage = firstpage;
}
public String getLastpage() {
return lastpage;
}
public void setLastpage(String lastpage) {
this.lastpage = lastpage;
}
public String getOnwizardback() {
return onwizardback;
}
public void setOnwizardback(String onwizardback) {
this.onwizardback = onwizardback;
}
public String getOnwizardcancel() {
return onwizardcancel;
}
public void setOnwizardcancel(String onwizardcancel) {
this.onwizardcancel = onwizardcancel;
}
public String getOnwizardfinish() {
return onwizardfinish;
}
public void setOnwizardfinish(String onwizardfinish) {
this.onwizardfinish = onwizardfinish;
}
public String getOnwizardnext() {
return onwizardnext;
}
public void setOnwizardnext(String onwizardnext) {
this.onwizardnext = onwizardnext;
}
public String getPagestep() {
return pagestep;
}
public void setPagestep(String pagestep) {
this.pagestep = pagestep;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
// @StartGeneration
protected void setProperties(UIComponent component) {
super.setProperties(component);
FacesContext facesContext = getFacesContext();
setBooleanAttribute(facesContext,component,"firstpage",firstpage);
setBooleanAttribute(facesContext,component,"lastpage",lastpage);
setMethodBinding(facesContext,component,"onwizardback",onwizardback);
setMethodBinding(facesContext,component,"onwizardcancel",onwizardcancel);
setMethodBinding(facesContext,component,"onwizardfinish",onwizardfinish);
setMethodBinding(facesContext,component,"onwizardnext",onwizardnext);
setIntegerAttribute(facesContext,component,"pagestep",pagestep);
setStringAttribute(facesContext,component,"title",title);
}
// @EndGeneration
}