You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Andreas Andreou (JIRA)" <de...@tapestry.apache.org> on 2011/02/28 12:43:37 UTC

[jira] Assigned: (TAPESTRY-1985) DatePicker improperly overrides ID attribute when generating JS, breaking functionality.

     [ https://issues.apache.org/jira/browse/TAPESTRY-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Andreou reassigned TAPESTRY-1985:
-----------------------------------------

    Assignee:     (was: Andreas Andreou)

> DatePicker improperly overrides ID attribute when generating JS, breaking functionality.
> ----------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1985
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1985
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 4.1, 4.1.1, 4.1.2, 4.1.3
>         Environment: Firefox (1.5+, 2+), IE (5+), Windows XP 64, Ubuntu (Fiesty Fawn), AMD & Intel
>            Reporter: Matthew Brock
>
> The DatePicker script file is incorrectly using the component's getName() method to determine the client-side input field.  IDs that contain periods will break the script.
> The offending code:
> [org.apache.tapestry.form.DatePicker.script] Line 64:  var field = dojo.byId("${formName}").${name};
> Example:
> <input jwcid="@DatePicker" id="string.with.periods" value="startDate" />
> According to the HTML spec (http://www.w3.org/TR/REC-html40/types.html#type-name):
> "ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")."
> If the component sees an idParameter has been set, it should navigate directly to the field (e.g., dojo.byId("${idParameter}") -- if idParameter were included in the script map).  If the developer wants to specify their own ID, then let them worry about the constraints of ID uniqueness.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira