}
@Override
protected void setProperties(final UIComponent uiComponent) {
super.setProperties(uiComponent);
final UIButton component = (UIButton) uiComponent;
final FacesContext context = FacesContext.getCurrentInstance();
final Application application = context.getApplication();
if (actionListener != null) {
component.addActionListener(new javax.faces.event.MethodExpressionActionListener(actionListener));
}
if (accessKey != null) {
if (!accessKey.isLiteralText()) {
component.setValueExpression("accessKey", accessKey);
} else {
component.setAccessKey(accessKey.getExpressionString().charAt(0));
}
}
if (markup != null) {
if (!markup.isLiteralText()) {
component.setValueExpression("markup", markup);
} else {
component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
}
}
if (link != null) {
component.setValueExpression("link", link);
}
if (labelWithAccessKey != null) {
component.setValueExpression("labelWithAccessKey", labelWithAccessKey);
}
if (defaultCommand != null) {
if (!defaultCommand.isLiteralText()) {
component.setValueExpression("defaultCommand", defaultCommand);
} else {
component.setDefaultCommand(Boolean.parseBoolean(defaultCommand.getExpressionString()));
}
}
if (tabIndex != null) {
if (!tabIndex.isLiteralText()) {
component.setValueExpression("tabIndex", tabIndex);
} else {
component.setTabIndex(Integer.parseInt(tabIndex.getExpressionString()));
}
}
if (tip != null) {
component.setValueExpression("tip", tip);
}
if (inline != null) {
if (!inline.isLiteralText()) {
component.setValueExpression("inline", inline);
} else {
component.setInline(Boolean.parseBoolean(inline.getExpressionString()));
}
}
if (action != null) {
component.setActionExpression(action);
}
if (jsfResource != null) {
if (!jsfResource.isLiteralText()) {
component.setValueExpression("jsfResource", jsfResource);
} else {
component.setJsfResource(Boolean.parseBoolean(jsfResource.getExpressionString()));
}
}
if (resource != null) {
component.setValueExpression("resource", resource);
}
if (transition != null) {
if (!transition.isLiteralText()) {
component.setValueExpression("transition", transition);
} else {
component.setTransition(Boolean.parseBoolean(transition.getExpressionString()));
}
}
if (image != null) {
component.setValueExpression("image", image);
}
if (label != null) {
component.setValueExpression("label", label);
}
if (immediate != null) {
if (!immediate.isLiteralText()) {
component.setValueExpression("immediate", immediate);
} else {
component.setImmediate(Boolean.parseBoolean(immediate.getExpressionString()));
}
}
if (omit != null) {
if (!omit.isLiteralText()) {
component.setValueExpression("omit", omit);
} else {
component.setOmit(Boolean.parseBoolean(omit.getExpressionString()));
}
}
if (renderedPartially != null) {
if (!renderedPartially.isLiteralText()) {
component.setValueExpression("renderedPartially", renderedPartially);
} else {
component.setRenderedPartially(splitList(renderedPartially.getExpressionString()));
}
}
if (target != null) {
component.setValueExpression("target", target);
}
if (onclick != null) {
component.setValueExpression("onclick", onclick);
}
if (disabled != null) {
if (!disabled.isLiteralText()) {
component.setValueExpression("disabled", disabled);
} else {
component.setDisabled(Boolean.parseBoolean(disabled.getExpressionString()));
}
}
}