Dave:

My apologies.  I just now changed the fields to <html:hidden>, and the
screen still works.  I encountered this problem early on in converting
my application to Struts, and I just made the fields <html:text> during
development as a workaround, since it was useful to display the keys for
testing anyway.  I should have re-tested before I posted my question.

I suspect that, as you indicated, I may have had the fields outside the
form in an attempt to bury them in some unused piece of screen real
estate.

Anyway, thanks for the reply.  Your implication that it should work at
least prompted me to go back and re-test.

-----Original Message-----
From: Dave Weis [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 30, 2002 8:49 AM
To: Struts Users Mailing List
Subject: Re: <html:hidden> fields



On Mon, 30 Sep 2002, Charles McClain wrote:
> I have what seems to be a fairly common situation which is not 
> producing the results I expected: On my JSPs and in my ActionForms, I 
> have a field which represents an artificial key for a database table.

> On an update, this field will have a value, but on a create, it must 
> be null. I populate the ActionForm from a data bean, and as long as 
> the field on my JSP is an <html:text>, everything works fine -- the 
> form gets populated, and, on a commit (for an update), the key gets 
> populated in the data bean just before the database operation.

Is the only change you made going from <html:text property="field"/> to
<html:hidden property="field"/> ? Make sure you still have the field
inside the form tags. Also, take a look at the page source and see if
the value is correct in the code and that it exists.

dave


-- 
Dave Weis             "I believe there are more instances of the
abridgment
[EMAIL PROTECTED]   of the freedom of the people by gradual and silent
                      encroachments of those in power than by violent 
                      and sudden usurpations."- James Madison


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to