UIComponentBase comp = null;
if (item.getValueTranslations().containsKey(property)) {
comp = new HtmlSelectOneMenu();
for (Object value : item.getValueTranslations().get(property).keySet()) {
String translation = (String) item.getValueTranslations().get(property).get(value);
UISelectItem selectItem = new UISelectItem();
selectItem.setItemLabel(translation);
selectItem.setItemValue(value);
comp.getChildren().add(selectItem);
}
((HtmlSelectOneMenu) comp).setValue(val);
} else {
if (!item.getSpecialProperties().containsKey(property)) {
if (pd.getReadMethod().getReturnType() == String.class
|| pd.getReadMethod().getReturnType() == Integer.class) {
comp = new HtmlInputText();
((HtmlInputText) comp).setValue(val);
} else if(pd.getReadMethod().getReturnType() == Boolean.class) {
comp = new HtmlSelectBooleanCheckbox();
UISelectItem box = new UISelectItem();
if((Boolean)val) {
((HtmlSelectBooleanCheckbox)comp).setSelected(Boolean.TRUE);
} else {
((HtmlSelectBooleanCheckbox)comp).setSelected(Boolean.FALSE);
}