I think you are correct. This has probably been working because the new field gets added as a text field (since it has an unknown value for its type attribute). Because of the logic you've seen, the text field is placed inside the invisible <div> the Form component renders, thus it is not visible to the user and acts just like a hidden field.
Good catch, please add an issue to JIRA. On Thu, Apr 29, 2010 at 10:32 AM, Dustin Woods <dustin.wo...@gmail.com> wrote: > Hi all, > > I was noticing on some pages that an empty text field was being shown after > submitting forms and narrowed it down to the tapestry.js code for the > Tapestry.FormEventManager class. > > setSubmittingElement : function(element) { > > if (!this.submitHidden) { > var hiddens = this.form.getInputs("hidden", "t:submit"); > > if (hiddens.size() == 0) { > > /** > * Create a new hidden field directly after the first hidden > * field in the form. > */ > var firstHidden = this.form.getInputs("hidden").first(); > > this.submitHidden = new Element("input", { > //type : "input", > type: "hidden", > name : "t:submit" > }); > > firstHidden.insert( { > after : this.submitHidden > }); > } else > this.submitHidden = hiddens.first(); > } > > this.submitHidden.value = element == null ? null : $(element).id; > }, > > Shouldn't the type of the new element be "hidden" and not "input"? > > Thanks, > Dustin > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org