Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-995

getMarkupId generates ID which contains special characters which should be escaped or replaced

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0-beta3
    • 1.3.0-rc1
    • wicket
    • None

    Description

      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.

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            alexandru.objelean Alexandru Objelean
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: