Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: extras
    • Labels:
      None
    • Environment:
      Linux Kubuntu 6.04 / click-1.4-RC1

      Description

      When adding a DateField in a FormTable, the html headers for the necessary JavaScript code are not included in the page ($import).

      // — snip
      FormTable table = new FormTable()
      FieldColumn column = new FieldColumn( "date", new DateField() )
      table.addColumn( column )
      // — snip

        Activity

        Hide
        sabob Bob Schellink added a comment -

        Hi Francois

        I ran into the same problem today. I think this is a limitation in FormTable currently.

        The workaround I used is to override getHtmlImports and manually add the DateField imports:

        ....
        final DateField dateField = new DateField();
        FormTable table = new FormTable("table") {

        public String getHtmlImports()

        { String parentImports = super.getHtmlImports(); HtmlStringBuffer buffer = new HtmlStringBuffer(parentImports.length() + 100); buffer.append(parentImports); buffer.append(dateField.getHtmlImports()); return buffer.toString(); }

        };

        Note: This issue is a good use case showcasing the need for the Container concept -> http://www.avoka.com/jira/browse/CLK-232

        Show
        sabob Bob Schellink added a comment - Hi Francois I ran into the same problem today. I think this is a limitation in FormTable currently. The workaround I used is to override getHtmlImports and manually add the DateField imports: .... final DateField dateField = new DateField(); FormTable table = new FormTable("table") { public String getHtmlImports() { String parentImports = super.getHtmlImports(); HtmlStringBuffer buffer = new HtmlStringBuffer(parentImports.length() + 100); buffer.append(parentImports); buffer.append(dateField.getHtmlImports()); return buffer.toString(); } }; Note: This issue is a good use case showcasing the need for the Container concept -> http://www.avoka.com/jira/browse/CLK-232
        Hide
        medgar Malcolm Edgar added a comment -

        Fix checked in and will be available in release 1.4-RC2

        Show
        medgar Malcolm Edgar added a comment - Fix checked in and will be available in release 1.4-RC2

          People

          • Assignee:
            medgar Malcolm Edgar
            Reporter:
            fxg François-Xavier Guillemette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development