Uploaded image for project: 'Click'
  1. Click
  2. CLK-3

Controls generate incompatable XHTML

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • 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."

      Attachments

        Activity

          People

            medgar Malcolm Edgar
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: