*/
protected void setProperties(UIComponent component)
{
// TODO Auto-generated method stub
super.setProperties(component);
HtmlToggleControl comp = (HtmlToggleControl) component;
if (this._accesskey != null) {
if (this._accesskey.isLiteralText()) {
try {
java.lang.String __accesskey = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._accesskey.getExpressionString(),
java.lang.String.class);
comp.setAccesskey(__accesskey);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("accesskey", this._accesskey);
}
}
setActionProperty(comp, this._action);
setActionListenerProperty(comp, this._actionListener);
if (this._ajaxSingle != null) {
if (this._ajaxSingle.isLiteralText()) {
try {
Boolean __ajaxSingle = (Boolean) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._ajaxSingle.getExpressionString(),
Boolean.class);
comp.setAjaxSingle(__ajaxSingle.booleanValue());
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("ajaxSingle", this._ajaxSingle);
}
}
if (this._bypassUpdates != null) {
if (this._bypassUpdates.isLiteralText()) {
try {
Boolean __bypassUpdates = (Boolean) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._bypassUpdates.getExpressionString(),
Boolean.class);
comp.setBypassUpdates(__bypassUpdates.booleanValue());
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("bypassUpdates", this._bypassUpdates);
}
}
if (this._data != null) {
if (this._data.isLiteralText()) {
try {
java.lang.Object __data = (java.lang.Object) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._data.getExpressionString(),
java.lang.Object.class);
comp.setData(__data);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("data", this._data);
}
}
if (this._dir != null) {
if (this._dir.isLiteralText()) {
try {
java.lang.String __dir = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._dir.getExpressionString(),
java.lang.String.class);
comp.setDir(__dir);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("dir", this._dir);
}
}
if (this._eventsQueue != null) {
if (this._eventsQueue.isLiteralText()) {
try {
java.lang.String __eventsQueue = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._eventsQueue.getExpressionString(),
java.lang.String.class);
comp.setEventsQueue(__eventsQueue);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("eventsQueue", this._eventsQueue);
}
}
if (this._focus != null) {
if (this._focus.isLiteralText()) {
try {
java.lang.String __focus = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._focus.getExpressionString(),
java.lang.String.class);
comp.setFocus(__focus);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("focus", this._focus);
}
}
if (this._for != null) {
if (this._for.isLiteralText()) {
try {
java.lang.String __for = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._for.getExpressionString(),
java.lang.String.class);
comp.setFor(__for);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("for", this._for);
}
}
if (this._ignoreDupResponses != null) {
if (this._ignoreDupResponses.isLiteralText()) {
try {
Boolean __ignoreDupResponses = (Boolean) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._ignoreDupResponses.getExpressionString(),
Boolean.class);
comp.setIgnoreDupResponses(__ignoreDupResponses.booleanValue());
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("ignoreDupResponses", this._ignoreDupResponses);
}
}
if (this._immediate != null) {
if (this._immediate.isLiteralText()) {
try {
Boolean __immediate = (Boolean) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._immediate.getExpressionString(),
Boolean.class);
comp.setImmediate(__immediate.booleanValue());
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("immediate", this._immediate);
}
}
if (this._lang != null) {
if (this._lang.isLiteralText()) {
try {
java.lang.String __lang = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._lang.getExpressionString(),
java.lang.String.class);
comp.setLang(__lang);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("lang", this._lang);
}
}
if (this._limitToList != null) {
if (this._limitToList.isLiteralText()) {
try {
Boolean __limitToList = (Boolean) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._limitToList.getExpressionString(),
Boolean.class);
comp.setLimitToList(__limitToList.booleanValue());
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("limitToList", this._limitToList);
}
}
if (this._onbeforedomupdate != null) {
if (this._onbeforedomupdate.isLiteralText()) {
try {
java.lang.String __onbeforedomupdate = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onbeforedomupdate.getExpressionString(),
java.lang.String.class);
comp.setOnbeforedomupdate(__onbeforedomupdate);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onbeforedomupdate", this._onbeforedomupdate);
}
}
if (this._onblur != null) {
if (this._onblur.isLiteralText()) {
try {
java.lang.String __onblur = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onblur.getExpressionString(),
java.lang.String.class);
comp.setOnblur(__onblur);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onblur", this._onblur);
}
}
if (this._onclick != null) {
if (this._onclick.isLiteralText()) {
try {
java.lang.String __onclick = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onclick.getExpressionString(),
java.lang.String.class);
comp.setOnclick(__onclick);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onclick", this._onclick);
}
}
if (this._oncomplete != null) {
if (this._oncomplete.isLiteralText()) {
try {
java.lang.String __oncomplete = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._oncomplete.getExpressionString(),
java.lang.String.class);
comp.setOncomplete(__oncomplete);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("oncomplete", this._oncomplete);
}
}
if (this._ondblclick != null) {
if (this._ondblclick.isLiteralText()) {
try {
java.lang.String __ondblclick = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._ondblclick.getExpressionString(),
java.lang.String.class);
comp.setOndblclick(__ondblclick);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("ondblclick", this._ondblclick);
}
}
if (this._onfocus != null) {
if (this._onfocus.isLiteralText()) {
try {
java.lang.String __onfocus = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onfocus.getExpressionString(),
java.lang.String.class);
comp.setOnfocus(__onfocus);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onfocus", this._onfocus);
}
}
if (this._onkeydown != null) {
if (this._onkeydown.isLiteralText()) {
try {
java.lang.String __onkeydown = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onkeydown.getExpressionString(),
java.lang.String.class);
comp.setOnkeydown(__onkeydown);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onkeydown", this._onkeydown);
}
}
if (this._onkeypress != null) {
if (this._onkeypress.isLiteralText()) {
try {
java.lang.String __onkeypress = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onkeypress.getExpressionString(),
java.lang.String.class);
comp.setOnkeypress(__onkeypress);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onkeypress", this._onkeypress);
}
}
if (this._onkeyup != null) {
if (this._onkeyup.isLiteralText()) {
try {
java.lang.String __onkeyup = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onkeyup.getExpressionString(),
java.lang.String.class);
comp.setOnkeyup(__onkeyup);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onkeyup", this._onkeyup);
}
}
if (this._onmousedown != null) {
if (this._onmousedown.isLiteralText()) {
try {
java.lang.String __onmousedown = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onmousedown.getExpressionString(),
java.lang.String.class);
comp.setOnmousedown(__onmousedown);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onmousedown", this._onmousedown);
}
}
if (this._onmousemove != null) {
if (this._onmousemove.isLiteralText()) {
try {
java.lang.String __onmousemove = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onmousemove.getExpressionString(),
java.lang.String.class);
comp.setOnmousemove(__onmousemove);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onmousemove", this._onmousemove);
}
}
if (this._onmouseout != null) {
if (this._onmouseout.isLiteralText()) {
try {
java.lang.String __onmouseout = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onmouseout.getExpressionString(),
java.lang.String.class);
comp.setOnmouseout(__onmouseout);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onmouseout", this._onmouseout);
}
}
if (this._onmouseover != null) {
if (this._onmouseover.isLiteralText()) {
try {
java.lang.String __onmouseover = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onmouseover.getExpressionString(),
java.lang.String.class);
comp.setOnmouseover(__onmouseover);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onmouseover", this._onmouseover);
}
}
if (this._onmouseup != null) {
if (this._onmouseup.isLiteralText()) {
try {
java.lang.String __onmouseup = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._onmouseup.getExpressionString(),
java.lang.String.class);
comp.setOnmouseup(__onmouseup);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("onmouseup", this._onmouseup);
}
}
if(null != this._panelId && this._panelId.isLiteralText()){
throw new IllegalArgumentException("Component org.richfaces.ToggleControl with Id " + component.getClientId(getFacesContext()) +" allows only EL expressions for property panelId");
}
if (this._panelId != null) {
if (this._panelId.isLiteralText()) {
try {
java.lang.String __panelId = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._panelId.getExpressionString(),
java.lang.String.class);
comp.setPanelId(__panelId);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("panelId", this._panelId);
}
}
if (this._process != null) {
if (this._process.isLiteralText()) {
try {
java.lang.Object __process = (java.lang.Object) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._process.getExpressionString(),
java.lang.Object.class);
comp.setProcess(__process);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("process", this._process);
}
}
if (this._reRender != null) {
if (this._reRender.isLiteralText()) {
try {
java.lang.Object __reRender = (java.lang.Object) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._reRender.getExpressionString(),
java.lang.Object.class);
comp.setReRender(__reRender);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("reRender", this._reRender);
}
}
if (this._requestDelay != null) {
if (this._requestDelay.isLiteralText()) {
try {
Integer __requestDelay = (Integer) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._requestDelay.getExpressionString(),
Integer.class);
comp.setRequestDelay(__requestDelay.intValue());
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("requestDelay", this._requestDelay);
}
}
if (this._similarityGroupingId != null) {
if (this._similarityGroupingId.isLiteralText()) {
try {
java.lang.String __similarityGroupingId = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._similarityGroupingId.getExpressionString(),
java.lang.String.class);
comp.setSimilarityGroupingId(__similarityGroupingId);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("similarityGroupingId", this._similarityGroupingId);
}
}
if (this._status != null) {
if (this._status.isLiteralText()) {
try {
java.lang.String __status = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._status.getExpressionString(),
java.lang.String.class);
comp.setStatus(__status);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("status", this._status);
}
}
if (this._style != null) {
if (this._style.isLiteralText()) {
try {
java.lang.String __style = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._style.getExpressionString(),
java.lang.String.class);
comp.setStyle(__style);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("style", this._style);
}
}
if (this._styleClass != null) {
if (this._styleClass.isLiteralText()) {
try {
java.lang.String __styleClass = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._styleClass.getExpressionString(),
java.lang.String.class);
comp.setStyleClass(__styleClass);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("styleClass", this._styleClass);
}
}
if (this._switchToState != null) {
if (this._switchToState.isLiteralText()) {
try {
java.lang.String __switchToState = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._switchToState.getExpressionString(),
java.lang.String.class);
comp.setSwitchToState(__switchToState);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("switchToState", this._switchToState);
}
}
if (this._tabindex != null) {
if (this._tabindex.isLiteralText()) {
try {
java.lang.String __tabindex = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._tabindex.getExpressionString(),
java.lang.String.class);
comp.setTabindex(__tabindex);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("tabindex", this._tabindex);
}
}
if (this._timeout != null) {
if (this._timeout.isLiteralText()) {
try {
Integer __timeout = (Integer) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._timeout.getExpressionString(),
Integer.class);
comp.setTimeout(__timeout.intValue());
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("timeout", this._timeout);
}
}
if (this._title != null) {
if (this._title.isLiteralText()) {
try {
java.lang.String __title = (java.lang.String) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._title.getExpressionString(),
java.lang.String.class);
comp.setTitle(__title);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("title", this._title);
}
}
if(null != this._value && this._value.isLiteralText()){
throw new IllegalArgumentException("Component org.richfaces.ToggleControl with Id " + component.getClientId(getFacesContext()) +" allows only EL expressions for property value");
}
if (this._value != null) {
if (this._value.isLiteralText()) {
try {
java.lang.Object __value = (java.lang.Object) getFacesContext().
getApplication().
getExpressionFactory().
coerceToType(this._value.getExpressionString(),
java.lang.Object.class);
comp.setValue(__value);
} catch (ELException e) {
throw new FacesException(e);
}
} else {
component.setValueExpression("value", this._value);