aspose file tools*
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
Author

Problems with h:selectOneRadio

robert isidorson
Greenhorn

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}" />
</h:selectOneRadio>


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()),
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: http://aspose.com/file-tools
 
subject: Problems with h:selectOneRadio
 
Similar Threads
Create a Different selectOneListbox Depending On the Radio Button Clicked
Preselection on Pick List?
Using boolean value in SelectOneRadio
Problem With selectOneMenu
f:selectItems and List - managed property