return;
}
}
}
AjaxBehavior ajaxBehavior = (AjaxBehavior) context.getApplication()
.createBehavior(AjaxBehavior.BEHAVIOR_ID);
if (_disabled != null)
{
if (_disabled.isLiteral())
{
ajaxBehavior.setDisabled(_disabled.getBoolean(faceletContext));
}
else
{
ajaxBehavior.setValueExpression("disabled", _disabled
.getValueExpression(faceletContext, Boolean.class));
}
}
if (_execute != null)
{
ajaxBehavior.setValueExpression("execute", _execute
.getValueExpression(faceletContext, Object.class));
}
if (_immediate != null)
{
if (_immediate.isLiteral())
{
ajaxBehavior
.setImmediate(_immediate.getBoolean(faceletContext));
}
else
{
ajaxBehavior.setValueExpression("immediate", _immediate
.getValueExpression(faceletContext, Boolean.class));
}
}
if (_listener != null)
{
MethodExpression expr = _listener.getMethodExpression(
faceletContext, Void.TYPE, AJAX_BEHAVIOR_LISTENER_SIG);
AjaxBehaviorListener abl = new AjaxBehaviorListenerImpl(expr);
ajaxBehavior.addAjaxBehaviorListener(abl);
}
if (_onerror != null)
{
if (_onerror.isLiteral())
{
ajaxBehavior.setOnerror(_onerror.getValue(faceletContext));
}
else
{
ajaxBehavior.setValueExpression("onerror", _onerror
.getValueExpression(faceletContext, String.class));
}
}
if (_onevent != null)
{
if (_onevent.isLiteral())
{
ajaxBehavior.setOnevent(_onevent.getValue(faceletContext));
}
else
{
ajaxBehavior.setValueExpression("onevent", _onevent
.getValueExpression(faceletContext, String.class));
}
}
if (_render != null)
{
ajaxBehavior.setValueExpression("render", _render
.getValueExpression(faceletContext, Object.class));
}
cvh.addClientBehavior(eventName, ajaxBehavior);
}