You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/08/24 00:35:28 UTC

[jira] Commented: (TAPESTRY-443) Template Parsing Regression

    [ http://issues.apache.org/jira/browse/TAPESTRY-443?page=comments#action_12319798 ] 

Howard M. Lewis Ship commented on TAPESTRY-443:
-----------------------------------------------

Odd; don't see any significant changes between beta-2 and HEAD.

Ahh ... there we go:

    private void addAttributeIfUnique(String tagName, String attributeName, String attributeValue)
            throws TemplateParseException
    {

        if (_attributes.containsKey(attributeName))
            templateParseProblem(
                    ParseMessages.duplicateTagAttribute(tagName, _line, attributeName),
                    getCurrentLocation(),
                    _line,
                    _cursor);

        _attributes.put(attributeName, attributeValue);
    }

So, the question is, can this be fixed?  Answer, not worth it.  Just look at the JavaScript he's using ... that will definately break in beta-5 because the way in which element names and ids are generated has changed.  This need to be converted into a script template.

> Template Parsing Regression
> ---------------------------
>
>          Key: TAPESTRY-443
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-443
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Scott Walter
>     Assignee: Howard M. Lewis Ship

>
> I have this snippet of javascript in one of my pages:
> 	<script>
> 		function changeTool() {
> 			
> 			for(i = 0; i<5;i++) {
> 				toolDiv = document.getElementById("tool" + i);
> 				if(i==document.$Form$0.$PropertySelection.selectedIndex) {
> 					toolDiv.style.visibility = "visible";
> 					toolDiv.style.display = "block";
> 				} else {
> 					toolDiv.style.visibility = "hidden";
> 					toolDiv.style.display = "none";					
> 				}
> 			}
> 		}
> 	</script>
> This worked under beta 2, but failes under beta 3 with:
> Tag <5;i++)> on line 12 contains more than one 'toolDiv.style.visibility' attribute.
> I should be able to set the value of an attribute more than once.

-- 
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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org