/*
* 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;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import org.xulfaces.annotation.taglib.ATTRIBUTE;
import org.xulfaces.annotation.taglib.TAG;
/**
*
* @author kito31
* @version $Id$
*/
@TAG(name="messages",description="Defines a messages board.")
public class MessagesTag extends AbstractComponentTag {
@ATTRIBUTE(mappedType="java.lang.Boolean",description="Sets to true if the detail of the associated message(s) should be displayed.")
private String showDetail;
@ATTRIBUTE(mappedType="java.lang.Boolean",description="Sets to true if the summary of the associated message(s) should be displayed.")
private String showSummary;
public String getComponentType() {
return "xul.component.Messages";
}
public String getRendererType() {
return "xul.renderer.Messages";
}
public String getShowDetail() {
return showDetail;
}
public void setShowDetail(String showDetail) {
this.showDetail = showDetail;
}
public String getShowSummary() {
return showSummary;
}
public void setShowSummary(String showSummary) {
this.showSummary = showSummary;
}
protected void setProperties(UIComponent component) {
super.setProperties(component);
FacesContext facesContext = getFacesContext();
setBooleanAttribute(facesContext,component,"showDetail",showDetail);
setBooleanAttribute(facesContext,component,"showSummary",showSummary);
}
}