}
@Override
protected void setProperties(final UIComponent uiComponent) {
super.setProperties(uiComponent);
final UISelectOneListbox component = (UISelectOneListbox) uiComponent;
final FacesContext context = FacesContext.getCurrentInstance();
final Application application = context.getApplication();
if (validatorMessage != null) {
component.setValueExpression("validatorMessage", validatorMessage);
}
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 (labelWithAccessKey != null) {
component.setValueExpression("labelWithAccessKey", labelWithAccessKey);
}
if (tabIndex != null) {
if (!tabIndex.isLiteralText()) {
component.setValueExpression("tabIndex", tabIndex);
} else {
component.setTabIndex(Integer.parseInt(tabIndex.getExpressionString()));
}
}
if (validator != null) {
component.addValidator(new javax.faces.validator.MethodExpressionValidator(validator));
}
if (tip != null) {
component.setValueExpression("tip", tip);
}
if (valueChangeListener != null) {
component.addValueChangeListener(new javax.faces.event.MethodExpressionValueChangeListener(valueChangeListener));
}
if (converter != null) {
if (!converter.isLiteralText()) {
component.setValueExpression("converter", converter);
} else {
component.setConverter(application.createConverter(converter.getExpressionString()));
}
}
if (value != null) {
component.setValueExpression("value", value);
}
if (focus != null) {
if (!focus.isLiteralText()) {
component.setValueExpression("focus", focus);
} else {
component.setFocus(Boolean.parseBoolean(focus.getExpressionString()));
}
}
if (required != null) {
if (!required.isLiteralText()) {
component.setValueExpression("required", required);
} else {
component.setRequired(Boolean.parseBoolean(required.getExpressionString()));
}
}
if (converterMessage != null) {
component.setValueExpression("converterMessage", converterMessage);
}
if (label != null) {
component.setValueExpression("label", label);
}
if (requiredMessage != null) {
component.setValueExpression("requiredMessage", requiredMessage);
}
if (onchange != null) {
component.setValueExpression("onchange", onchange);
}
if (readonly != null) {
if (!readonly.isLiteralText()) {
component.setValueExpression("readonly", readonly);
} else {
component.setReadonly(Boolean.parseBoolean(readonly.getExpressionString()));
}
}
if (disabled != null) {
if (!disabled.isLiteralText()) {
component.setValueExpression("disabled", disabled);
} else {
component.setDisabled(Boolean.parseBoolean(disabled.getExpressionString()));
}
}
}