[ http://issues.apache.org/jira/browse/TAPESTRY-431?page=all ]
Howard M. Lewis Ship resolved TAPESTRY-431:
-------------------------------------------
Resolution: Duplicate
> TemplateParser silently discards tag attributes if there are duplicates
> -----------------------------------------------------------------------
>
> Key: TAPESTRY-431
> URL: http://issues.apache.org/jira/browse/TAPESTRY-431
> Project: Tapestry
> Type: Bug
> Components: Framework
> Versions: 3.0.3
> Reporter: Geoff Longman
> Priority: Minor
>
> This shows an example.
> <input jwcid="@TextField" value="ognl:emailAddress" type="text"
> name="emailaddress" id="emailaddress" size="10" maxlength="25" value="" />
> One possible scenario, designer gives developer a page with a long <input>
> tag.
> Developer adds jwcid and ognl expression for 'value' but misses the fact that
> there is already a 'value' attribute. Unless this case was handled as an
> error, the TemplateParser
> will silently throw away the first 'value' attribute and bind the parameter
> statically.
> This hurts in, say, a TextField as Tapestry dumps an exception page when it
> tries to update
> value's binding since static bindings do not allow this.
>
> Tough to track down as, in this case, the stack trace shows that
> AbstractBinding.setString()
> throwing the exception. My experience with coworkers this week is that
> encountering this issue is painful unless you are well familliar with the
> mechanics of bindings.
> In other words, this *kills* newbies!
> I have built a fix, yet to be checked in. All tests still run + I created a
> new test. I started in the T3 3.0 branch because a) The issue may be fixed
> in T4 already (have not checked yet) b) Spindle for T3 needs this fix.
> The fix will detect the duplicate and build the message, "Tag <{0}> on line
> {1} contains more than one ''{2}'' attribute."
> I think this is an error that should stop the template parse. But, if that is
> not desired, it could just be a logged event, or both. Pls, nobody suggest
> that the behaviour be configurable. This is happening at pretty much the
> lowest level in Tapestry and IMO it should be both an exception and a log
> entry. Doesn't matter to Spindle as the the mechanism for doing either suite
> me fine.
> comments?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]