The moose likes JSF and the fly likes Problems with h:selectOneRadio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problems with h:selectOneRadio" Watch "Problems with h:selectOneRadio" New topic

Problems with h:selectOneRadio

robert isidorson

Joined: Sep 03, 2007
Posts: 19
I have a component containing timer objects, that are date objects formatted to SelectItems.

<h:selectOneRadio value="#{timer.selectedTimer}" layout="pageDirection"
<f:selectItems value="#{timer.timers}" />

In backing bean:
public List<SelectItem> getTimers() {
DateFormat ft = new SimpleDateFormat("HH:mm");

for(QueueTimer x : timers) {
itemList.add( new SelectItem( ft.format(x.getTimer()),
return itemList;

On the page i then have one input field and one commandbutton:
<h:inputText value="#{timer.newTime}" size="5"><f:convertDateTime pattern="HH:mm"/></h:inputText>
<h:commandButton action="#timer.delete"/>

The problem: when i clicking on delete i get a converter error:
Conversion Error setting value '11:26' for 'null Converter'

My guess is that this is related to that <h:selectRadio contains SelectItems and it tries to convert those to date objects? but i dont know, anyone?
I agree. Here's the link:
subject: Problems with h:selectOneRadio
It's not a secret anymore!