org.ajax4jsf.framework.taglib.HtmlComponentTagBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ajax4jsf Show documentation
Show all versions of ajax4jsf Show documentation
Ajax4jsf is an open source extension to the JavaServer Faces standard that adds AJAX capability to JSF applications without requiring the writing of any JavaScript.
The newest version!
/**
* Licensed under the Common Development and Distribution License,
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.sun.com/cddl/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package org.ajax4jsf.framework.taglib;
import javax.faces.component.UIComponent;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
/**
* Base tag for all components with common Html attributes.
* @author [email protected] (latest modification by $Author: sergeysmirnov $)
* @version $Revision: 1.1 $ $Date: 2006/04/28 02:05:43 $
*
*/
public abstract class HtmlComponentTagBase extends UIComponentTagBase {
//HTML universal attributes
private String _dir;
private String _lang;
private String _style;
private String _styleClass;
private String _title;
//HTML event handler attributes
private String _onclick;
private String _ondblclick;
private String _onkeydown;
private String _onkeypress;
private String _onkeyup;
private String _onmousedown;
private String _onmousemove;
private String _onmouseout;
private String _onmouseover;
private String _onmouseup;
public void release() {
super.release();
_dir=null;
_lang=null;
_style=null;
_styleClass=null;
_title=null;
_onclick=null;
_ondblclick=null;
_onkeydown=null;
_onkeypress=null;
_onkeyup=null;
_onmousedown=null;
_onmousemove=null;
_onmouseout=null;
_onmouseover=null;
_onmouseup=null;
}
protected void setProperties(UIComponent component)
{
super.setProperties(component);
setStringProperty(component, HTML.dir_ATTRIBUTE, _dir);
setStringProperty(component, HTML.lang_ATTRIBUTE, _lang);
setStringProperty(component, HTML.style_ATTRIBUTE, _style);
setStringProperty(component, HTML.title_ATTRIBUTE, _title);
setStringProperty(component, HTML.STYLE_CLASS_ATTR, _styleClass);
setStringProperty(component, HTML.onclick_ATTRIBUTE, _onclick);
setStringProperty(component, HTML.ondblclick_ATTRIBUTE, _ondblclick);
setStringProperty(component, HTML.onmousedown_ATTRIBUTE, _onmousedown);
setStringProperty(component, HTML.onmouseup_ATTRIBUTE, _onmouseup);
setStringProperty(component, HTML.onmouseover_ATTRIBUTE, _onmouseover);
setStringProperty(component, HTML.onmousemove_ATTRIBUTE, _onmousemove);
setStringProperty(component, HTML.onmouseout_ATTRIBUTE, _onmouseout);
setStringProperty(component, HTML.onkeypress_ATTRIBUTE, _onkeypress);
setStringProperty(component, HTML.onkeydown_ATTRIBUTE, _onkeydown);
setStringProperty(component, HTML.onkeyup_ATTRIBUTE, _onkeyup);
}
public void setStyleClass(String styleClass)
{
_styleClass = styleClass;
}
public void setDir(String dir)
{
_dir = dir;
}
public void setLang(String lang)
{
_lang = lang;
}
public void setStyle(String style)
{
_style = style;
}
public void setTitle(String title)
{
_title = title;
}
public void setOnclick(String onclick)
{
_onclick = onclick;
}
public void setOndblclick(String ondblclick)
{
_ondblclick = ondblclick;
}
public void setOnmousedown(String onmousedown)
{
_onmousedown = onmousedown;
}
public void setOnmouseup(String onmouseup)
{
_onmouseup = onmouseup;
}
public void setOnmouseover(String onmouseover)
{
_onmouseover = onmouseover;
}
public void setOnmousemove(String onmousemove)
{
_onmousemove = onmousemove;
}
public void setOnmouseout(String onmouseout)
{
_onmouseout = onmouseout;
}
public void setOnkeypress(String onkeypress)
{
_onkeypress = onkeypress;
}
public void setOnkeydown(String onkeydown)
{
_onkeydown = onkeydown;
}
public void setOnkeyup(String onkeyup)
{
_onkeyup = onkeyup;
}
}