You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ryan Holmes (JIRA)" <ji...@apache.org> on 2007/09/25 09:30:50 UTC

[jira] Commented: (WICKET-995) getMarkupId generates ID which contains special characters which should be escaped or replaced

    [ https://issues.apache.org/jira/browse/WICKET-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530059 ] 

Ryan Holmes commented on WICKET-995:
------------------------------------

The period is a valid character in an HTML ID. See http://www.w3.org/TR/html4/types.html#type-id.

To refer to an HTML ID with a period in a CSS selector context, the period must be escaped. If JQuery does not support this, it is a JQuery bug and should be filed with them.

The automatic transformation of certain characters by a framework is exactly the kind of magic behavior that confuses users and therefore I think the recommended "fix" is a bad idea.

Furthermore, since no actual bug has been reported here, this issue should probably be resolved as invalid.




> getMarkupId generates ID which contains special characters which should be escaped or replaced
> ----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-995
>                 URL: https://issues.apache.org/jira/browse/WICKET-995
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>
> This is about how wicket generates dynamically markupID.
> I have, for instance, the following markup component:
> <input wicket:id="quantity.noOfUnits" />
> The generated markupId for this component looks like the following: quantity.noOfUnits1232 .
> I suggest to escape any css valid specifiers from the generated markupId, by replacing them with something else (for instance '_' character).
> The problem appear when I am trying to identify the component by it's id using some js library (like jQuery) and as a consequence the result of this query: $("#quantity.noOfUnits1232") is invalid. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.