Sorry that I didn't state clearly.
There are seperate buttons in both parent form and child form.
The problem is when I use dateField / textField to display the datetime on the jsp, the update and insert function on the parent form doesn't work. (Update and insert on child form still works fine)
the parent form displays records from parentTable which consists ID, LAST_UPDATE_DATE and some other fields.
the child form displays records from childTable which consists ID, EMAIL
What I want to do is display an editable form for users, and update LAST_UPDATE_DATE when the user modify the data. So I use textField to show the data. It works fine for other fields, but not LAST_UPDATE_DATE (which is a datetime field). The update function doesn't work. If I use dateLabel for LAST_UPDATE_DATE instead, which means to make it non-editable, the update function works fine. Same for insert function.
I tried to remove the child form, ie. to show the parent form only. But still the update function doesn't work if I use textField / dateField for displaying datetime
So do you know what's wrong?
THANKS!
Karen
On 8/9/06, Henner Kollmann <[EMAIL PROTECTED]> wrote:
Update of the parent form or update of the child form?
For the child form you need an seperated update button or you must use the
autoUpdate attribute of the form tag!
Best regards,
Henner
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On
> Behalf Of O Karen
> Sent: Wednesday, August 09, 2006 5:26 AM
> To: [email protected]
> Subject: [dbforms] Update with datefield / textfield problem
>
> Hi!
>
> I am using DBForms 2.6 and Tomcat 5.0, and I have a problem
> when update a form with datefield.
>
> It is a nested form and there is a datetime field in the
> parent form. Functions of update, insert and delete are
> available in both forms. Parent form shows one record while
> the subform shows many records.
>
> When I display the datetime field using dateLabel, all
> functions perform correctly on both subform and parent form.
>
> But if I replace the dateLabel field by dateField or
> textField, neither update nor insert works on the parent
> form. (The subform still works)
>
> textField setting:
> <db:textField fieldName="REC_UPD_DT" size="28"
> defaultValue="<%=formattedDate%>" pattern="yyyy-MM-dd (E)
> HH:mm:ss.SSS" styleClass="clsInputStyle" />
>
> dateField setting:
> <db:dateField fieldName="REC_UPD_DT" pattern="yyyy-MM-dd (E)
> HH:mm:ss.SSS" styleClass="clsInputStyle" size="28"
> overrideValue="<%=formattedDate%>" useJsCalendar="true"/>
>
> What I want to do is to display the current datetime to the
> user, and whenever the user update /insert the form, the
> current datetime is updated to the database.
>
> formattedDate is set as follows:
>
> <%
> DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd
> hh:mm:ss.SSS"); Date currentDate = new Date(); String
> formattedDate = sdf.format(currentDate); %>
>
> The current time is displayed correctly on the jsp, but when
> i clicked update / insert, it is directed to another record,
> and no update / insert is done.
>
> Did I set something wrong? Or is there something missing?
>
> THANKS A LOT :)
>
> Karen
>
>
--
Karen O
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ DbForms Mailing List
http://www.wap-force.net/dbforms
