File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems with h:selectOneRadio

 
robert isidorson
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic