[
https://issues.apache.org/jira/browse/WICKET-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530386
]
Martijn Dashorst commented on WICKET-995:
-----------------------------------------
Repeating that something is not a bug is not making it more true. Alex have you
even bothered to read http://www.w3.org/TR/html4/types.html#type-id ?
The specification of HTML and CSS are clearly in conflict: the "." *IS* a valid
character in markup ID's. You can look it up.
Furthermore, #foo.bar does not point to element foo with class bar, it points
to element foo, or at least it should: the class is extra garbage that should
not be included if the developer is worth his money.
So in effect JQuery, you, the CSS committee, the world and the universe are
buggy.
That said: replacing the period with a _ *IS* dangerous as it will generate
quite some buggy code in the wicket case. An underscore character is a valid
Java character for names of properties. There are (gak!) people that don't use
camelcase, but underscores to separate proper nouns in propertynames. This
clearly is not a two way conversion, and therefore should not be used as a
conversion for the separation between properties.
> 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.