}
@Override
protected void setProperties(final UIComponent uiComponent) {
super.setProperties(uiComponent);
final UIIn component = (UIIn) uiComponent;
final FacesContext context = FacesContext.getCurrentInstance();
final Application application = context.getApplication();
if (validatorMessage != null) {
component.setValueExpression("validatorMessage", validatorMessage);
}
if (markup != null) {
if (!markup.isLiteralText()) {
component.setValueExpression("markup", markup);
} else {
component.setMarkup(org.apache.myfaces.tobago.context.Markup.valueOf(markup.getExpressionString()));
}
}
if (validator != null) {
component.addValidator(new javax.faces.validator.MethodExpressionValidator(validator));
}
if (tabIndex != null) {
if (!tabIndex.isLiteralText()) {
component.setValueExpression("tabIndex", tabIndex);
} else {
component.setTabIndex(Integer.parseInt(tabIndex.getExpressionString()));
}
}
if (password != null) {
if (!password.isLiteralText()) {
component.setValueExpression("password", password);
} else {
component.setPassword(Boolean.parseBoolean(password.getExpressionString()));
}
}
if (tip != null) {
component.setValueExpression("tip", tip);
}
if (suggestMethod != null) {
component.setSuggestMethodExpression(suggestMethod);
}
if (suggestDelay != null) {
if (!suggestDelay.isLiteralText()) {
component.setValueExpression("suggestDelay", suggestDelay);
} else {
component.setSuggestDelay(Integer.parseInt(suggestDelay.getExpressionString()));
}
}
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 (suggestMinChars != null) {
if (!suggestMinChars.isLiteralText()) {
component.setValueExpression("suggestMinChars", suggestMinChars);
} else {
component.setSuggestMinChars(Integer.parseInt(suggestMinChars.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 (placeholder != null) {
component.setValueExpression("placeholder", placeholder);
}
if (label != null) {
component.setValueExpression("label", label);
}
if (autocomplete != null) {
if (!autocomplete.isLiteralText()) {
component.setValueExpression("autocomplete", autocomplete);
} else {
component.setAutocomplete(Boolean.parseBoolean(autocomplete.getExpressionString()));
}
}
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()));
}
}
}