how to format jsf 2.0 <f:selectItems/> with date value from List

Posted by Marko on Stack Overflow See other posts from Stack Overflow or by Marko
Published on 2010-05-30T13:12:55Z Indexed on 2010/05/30 13:22 UTC
Read the original article Hit count: 163

Filed under:
|
|
|

Hi,

Im using jsf 2.0 to develop app where user has to select (using radio button) a date from the list of possible choices. List of dates is a managed bean property of type List< java.util.Date>. Im using facelets

<h:selectOneRadio value="#{banner_backing.selectedInterval}" border="1" layout="pageDirection">
        <f:selectItems value="#{banner_backing.avaliableIntervals}" var="interval">                    
                </f:selectItems>
</h:selectOneRadio>

to display radio buttons.

Here is my question: how to format selectItems label and value in a patter other then default (Fri May 28 00:00:00 CEST 2010), like 'HH:mm:ss dd/MM/yyyy'?

© Stack Overflow or respective owner

Related posts about date

Related posts about format