On Tue, Jun 14, 2011 at 1:17 PM, Rich M <rich...@moremagic.com> wrote:
> On 06/14/2011 02:33 PM, Howard Lewis Ship wrote:
>>
>> Is is just one specific field that fails?  Perhaps there's something
>> odd about the field's name (the way naming a Form field "submit" can
>> cause grief ... something Tapestry won't even try to do now).
>>
>> This code has changed in 5.3 recently, to defer the lookup until an
>> error actually needs to be displayed.
>>
> Hmm, interesting point. The first times it was failing on a field named
> 'name'. That went away when I overrode the property block of the name field
> in the BeanEditForm (which had been implicit due to t:include directive) to
> explicitly declare the label and textfield, even though they were still set
> to 'name'. That behavior was what set off a '!' in my head about the whole
> thing, followed by the error jumping to a different field.
>
> The new field it moved to was 'id', which already had a property block
> override written. When I renamed the t:id for the textfield for the id field
> to 'tid', this error went away. So in this case, it did seem to be a result
> of a name causing grief.
>
> What worries me is that these are field names used conventionally across my
> entity objects. I'd not expect an entity field's name to trigger browser
> side effects. The workaround seems to be writing property overrides for
> every form related to an entity object with these names, or refactoring all
> the entity objects.
>
> I suppose I can do one of the two for the time being, but I am curious as to
> some kind of resolution. It's hard from a developer's standpoint to infer
> that an entity field's name is going to circumstantially break an internal
> Component's behavior.

Got to love that mutable client-side DOM.

Ok, looks like this list (from TapestryModule) is insufficient:

        configuration.add(InternalSymbols.PRE_SELECTED_FORM_NAMES,
"reset,submit,select,id,method,action,onsubmit");


You can override this in your own module, and add in "name".  Looks
like 'id' is already in there, so perhaps there's something else going
on I'm not aware of.



>
> Regards,
> Rich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
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

Reply via email to