title: JSF: selectOneRadio converter problem
body: <p>I'm having trouble using a selectOneRadio component. I get a NullPointerException in my Converter's getAsString. That exception is thrown before I even get to see that component.</p>
  
  <p>This is how it looks like:</p>
  
  <pre><code>            &lt;h:selectOneRadio id="bookA"
                  value="#{bookHandler.compareBookA}"&gt;
                   &lt;f:converter converterId="bookConverter" /&gt;
                  &lt;f:selectItems value="#{bookHandler.selectedBooks}"
                      var="book" itemLabel="#{book.shortname}" itemValue="#{book}" /&gt;
              &lt;/h:selectOneRadio&gt;
  </code></pre>
  
  <p>The property compareBookA is an object of type Book. </p>
  
  <p>This is the method that throws the NPE:</p>
  
  <pre><code>@Override
  public String getAsString(FacesContext fc, UIComponent uic, Object value)
          throws ConverterException {
      Book book = (Book) value;
      if (book == null ) {
          throw new ConverterException("NPE...");
      }
      return book.getShortname();
  }
  </code></pre>
  
  <p>I have also overwritten toString().</p>
  
  <p>For some reason the component is rendered if I change it to selectManyCheckbox (and leave the rest like it is). </p>
  
  <p>I'm using JSF 2 (MyFaces implementation) with Tomahawk on Tomcat.</p>
  
  <p>Bonus question: Why do I need a converter in the first place? If I leave the converter away, the component is rendered, but I want to pass the chosen book to some action method and it won't be a Book then.</p>
  
  <p>Any ideas?
  Thanks!</p>