Click
  1. Click
  2. CLK-3

Controls generate incompatable XHTML

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      This issue was raised by Andrus Adamchik:

      "I used Click AJAX features and discovered that most standard
      controls are not XHTML compatible. So I had to create my own ugly
      formatter method to filter Field output:

      public String xml(Field field) {
      // fixing click bug - fields rendering is not XHTML compatible

      if (field == null)

      { return ""; }

      String string = field.toString();
      if (string.startsWith("<input"))

      { string = string.replace("checked", "checked='checked'"); string = string.replaceAll("([\\w])''", "\\1'"); string = string.substring(0, string.length() - 1) + "/>"; }

      else if (string.startsWith("<select"))

      { string = string.replace("selected", "selected='selected'"); }

      return string;
      }

      It would be nice if the framework could generate XHTML by default or
      have a flag somewhere to control it."

        Activity

          People

          • Assignee:
            Malcolm Edgar
            Reporter:
            Andrus Adamchik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development