/*
* 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 page tag.</p>
*
* @author kito31
* @version $Id: WizardPageTag.java,v 1.3 2007/05/08 14:21:07 kito31 Exp $
*/
@TAG(name="wizardpage",description="Defines a wizard page (see XUL wizardpage element).")
public class WizardPageTag extends XULComponentTag {
@ATTRIBUTE(description = "Set this attribute to a description to appear in the wizard header while the page is being displayed.")
private String description;
@ATTRIBUTE(description = "The title that appears on the top of the wizard while the page is displayed.")
private String label;
@ATTRIBUTE(description = "Set to the page ID of the next page after this one.")
private String next;
@ATTRIBUTE(supportsMethodBinding=true,description = "This should be set to code which is called when the user presses the Next button while on the current page. ")
private String onpageadvanced;
@ATTRIBUTE(supportsMethodBinding=true,description = "The code in this attribute is called when the page is hidden, such as when moving to another page.")
private String onpagehide;
@ATTRIBUTE(supportsMethodBinding=true,description = "This should be set to code which is called when the user presses the Back button while on the current page. ")
private String onpagerewound;
@ATTRIBUTE(supportsMethodBinding=true,description = "The code in this attribute is called when the page is shown.")
private String onpageshow;
@ATTRIBUTE(description = "This attribute should be set to a string that identifies the page's identifer in the wizard.")
private String pageid;
public String getRendererType() {
return "xul.renderer.WizardPage";
}
public String getComponentType() {
return "xul.component.WizardPage";
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getNext() {
return next;
}
public void setNext(String next) {
this.next = next;
}
public String getOnpageadvanced() {
return onpageadvanced;
}
public void setOnpageadvanced(String onpageadvanced) {
this.onpageadvanced = onpageadvanced;
}
public String getOnpagehide() {
return onpagehide;
}
public void setOnpagehide(String onpagehide) {
this.onpagehide = onpagehide;
}
public String getOnpagerewound() {
return onpagerewound;
}
public void setOnpagerewound(String onpagerewound) {
this.onpagerewound = onpagerewound;
}
public String getOnpageshow() {
return onpageshow;
}
public void setOnpageshow(String onpageshow) {
this.onpageshow = onpageshow;
}
public String getPageid() {
return pageid;
}
public void setPageid(String pageid) {
this.pageid = pageid;
}
// @StartGeneration
protected void setProperties(UIComponent component) {
super.setProperties(component);
FacesContext facesContext = getFacesContext();
setStringAttribute(facesContext,component,"description",description);
setStringAttribute(facesContext,component,"label",label);
setStringAttribute(facesContext,component,"next",next);
setMethodBinding(facesContext,component,"onpageadvanced",onpageadvanced);
setMethodBinding(facesContext,component,"onpagehide",onpagehide);
setMethodBinding(facesContext,component,"onpagerewound",onpagerewound);
setMethodBinding(facesContext,component,"onpageshow",onpageshow);
setStringAttribute(facesContext,component,"pageid",pageid);
}
// @EndGeneration
}