Fork me on GitHub
Attention: This component is still under progress and experimental.
b:radioBox The radioBox tag renders an HTML "input" elements of the type "radio". This component is designed for situations where you want to display a mutually exclusive list of options to the user as a set of radio buttons.
Tag attributes
Tag controls
  • string Add single f:selectItem for each string value
  • enum Add f:selectItems for enum value
  • object Add f:selectItems for object value and corresponding converter
  • template Add object as values and add templace facet
Change it and see JSF example.
Adds f:ajax as child to component.

Change it and see JSF example.
component
tooltip

                            <!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://xmlns.jcp.org/jsf/html" 
      xmlns:f="http://xmlns.jcp.org/jsf/core" 
      xmlns:b="http://butterfaces.org/components"> 
<h:head /> 
<body>
    <h:form id="formId">
        <b:radioBox id="input"
                    label="label"
                    hideLabel="false"
                    value="#{myBean.selectedValue}"
                    values="#{myBean.values}"
                    readonly="false"
                    required="false"
                    disabled="false"
                    rendered="true">
            <b:tooltip>
                tooltip
            </b:tooltip>
        </b:radioBox>
    </h:form> 
</body> 
</html>
                        
                            package org.butterfaces.radioBox.demo;

import javax.faces.view.ViewScoped;
import javax.inject.Named;

@ViewScoped
@Named
public class MyBean implements Serializable {

    private String selectedValue;

    public List<String> getValues() {
        return Arrays.asList("Year 2000", "Year 2010", "Year 2020");
    }

    // GETTER + SETTER (selectedValue)

}