| Author |
example of source code for insert a date
|
asmaa kellal
Greenhorn
Joined: May 22, 2011
Posts: 18
|
|
Hello
I need a simple example of source code to insert a date into a database using jsf what do I have to put in backing bean and page jsf ( i need juste a date )
thanks
|
 |
Milan Mendpara
Greenhorn
Joined: May 10, 2011
Posts: 7
|
|
it might work for you by casting it to GregorianCalendar .........
<ace:dateTimeEntry value="#{backBean.urDate}">
<f:convertDateTime dateStyle="short" pattern="MM/dd/yyyy" type="date" />
</ace:dateTimeEntry>
Calendar cal = Calendar.getInstance();
cal.setTime(urDate);
XMLGregorianCalendar xcal = DatatypeFactory.newInstance().newXMLGregorianCalendar((GregorianCalendar) cal);
obj.setDate(xcal);
// your code
|
 |
 |
|
|
subject: example of source code for insert a date
|
|
|