this is my managed bean user,i've declared it in session scope. I've posted you only important code..i hope you help me,thanks.
public class User extends Visit { private Date dataReg; public void setDataReg(Date dataReg) { this.dataReg = dataReg; } /** * @return Returns the teamname. * @uml.property name="teamname" */ public Date getDataReg() { return dataReg; } public void AddNewUser(ActionEvent e) throws Exception { pst = conn.prepareStatement("INSERT INTO utente(username,password,nomegruppo,tipo,nome,cognome,citta,dataReg) VALUES (?,?,?,?,?,?,?,?)"); pst.setString(1, login); pst.setString(2, password); pst.setString(3, teamname); pst.setString(4, role); pst.setString(5, firstName); pst.setString(6, lastName); pst.setString(7, city); pst.setDate(8, dataReg); pst.executeUpdate(); } danielitob wrote: > > Hi guys, > i was surprising to note how difficult is using an inputDate of > Tomahawk... > i've read many examples but i need a simplest solution... > i've used in my jsf page > > <h:outputText value="Data"/> > <t:inputDate value="#{user.dataReg}"> > > </t:inputDate> > > and i've a date columns in a mysql table. > I've to read this value entered in my page and putting it into database... > i do it in this manner > > pst.setDate(12, dataReg); > > (i've 12 fields in my table). > When i do it i've > > java.lang.IllegalArgumentException: argument type mismatch > > How can i solve it? > I need a converter? > Please help me with code......thanks very much > -- View this message in context: http://www.nabble.com/Date-component-tf2369054.html#a6605484 Sent from the MyFaces - Users mailing list archive at Nabble.com.