Skip to content

Commit

Permalink
Merge pull request #782 from NicolaIsotta/master
Browse files Browse the repository at this point in the history
Don't ignore f:selectItem value
  • Loading branch information
stephanrauh authored May 16, 2017
2 parents f129f2b + 2c87f16 commit 3949342
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/main/java/net/bootsfaces/component/SelectItemUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,16 @@ public static List<SelectItemAndComponent> collectOptions(FacesContext context,
}

private static SelectItem toSelectItem(UISelectItem option) {
SelectItem item = new SelectItem();
item.setDescription(option.getItemDescription());
item.setDisabled(option.isItemDisabled());
item.setEscape(option.isItemEscaped());
item.setLabel(option.getItemLabel());
item.setNoSelectionOption(option.isNoSelectionOption());
item.setValue(option.getItemValue());
SelectItem item = (SelectItem) option.getValue();
if (item == null) {
item = new SelectItem();
item.setDescription(option.getItemDescription());
item.setDisabled(option.isItemDisabled());
item.setEscape(option.isItemEscaped());
item.setLabel(option.getItemLabel());
item.setNoSelectionOption(option.isNoSelectionOption());
item.setValue(option.getItemValue());
}
return item;
}

Expand Down

0 comments on commit 3949342

Please sign in to comment.