diff --git a/src/main/java/net/bootsfaces/component/radiobutton/Radiobutton.java b/src/main/java/net/bootsfaces/component/radiobutton/Radiobutton.java index f72194445..f0479b3a7 100644 --- a/src/main/java/net/bootsfaces/component/radiobutton/Radiobutton.java +++ b/src/main/java/net/bootsfaces/component/radiobutton/Radiobutton.java @@ -65,7 +65,7 @@ public void processEvent(ComponentSystemEvent event) throws AbortProcessingExcep } } -public String getFamily() { + public String getFamily() { return COMPONENT_FAMILY; } diff --git a/src/main/java/net/bootsfaces/component/radiobutton/RadiobuttonRenderer.java b/src/main/java/net/bootsfaces/component/radiobutton/RadiobuttonRenderer.java index 922a31c77..fd3175bfc 100644 --- a/src/main/java/net/bootsfaces/component/radiobutton/RadiobuttonRenderer.java +++ b/src/main/java/net/bootsfaces/component/radiobutton/RadiobuttonRenderer.java @@ -205,8 +205,12 @@ public void encodeBegin(FacesContext context, UIComponent component) throws IOEx // traditional JSF approach using f:selectItem[s] int counter=0; for (SelectItemAndComponent option:options) { + String o = null; + if (null != option.getSelectItem().getValue()) { + o = String.valueOf(option.getSelectItem().getValue()); + } generateASingleRadioButton(context, component, radiobutton, rw, propertyName, beanValue, - option.getSelectItem().getValue(), + o, option.getSelectItem().getLabel(), clientId+(counter++), option.getSelectItem().isDisabled()); }