Click
  1. Click
  2. CLK-574

DateField .help property is rendered twice

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0 RC1
    • Fix Version/s: 2.1.0
    • Component/s: extras
    • Labels:
      None

      Description

      If the fieldname.help property is defined in the page property file, the help text for the DateField is rendered twice, first after the input field, then after the calendar icon:

      <td class="fields" align="left"><label for="date_field">Enter the date</label> </td>
      <td align="left"><input type="text" name="date" id="date_field" value="" size="20" title="The title"/>Help Me!<img align="top" style="cursor:hand" src="/click/calendar/calendar.gif" id="date_field-button" alt="Calendar" title="Calendar"/>Help Me!</td>

      While DateField tries to null out the help field in its render(buffer) method, the getHelp() method in Field will still return the help text from the property file.

      TestPage.java:

      public class TestPage extends Page {
      @Bindable
      public Form form = new Form();
      public TestPage()

      { form.add(new DateField("date")); }

      }

      TestPage.properties:

      date.help=Help Me!
      date.title=The title
      date.label=Enter the date

      test.htm:

      <html>
      <head>
      <title>Test</title>
      </head>
      <body>
      $form
      </html>
      </html>

        Activity

        Bob Schellink made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Bob Schellink [ sabob ]
        Fix Version/s 2.1.0 [ 12313730 ]
        Resolution Fixed [ 1 ]
        Hide
        Bob Schellink added a comment -

        Hi Finn, thanks for raising this issue. Fix checked into trunk.

        Show
        Bob Schellink added a comment - Hi Finn, thanks for raising this issue. Fix checked into trunk.
        Finn Bock created issue -

          People

          • Assignee:
            Bob Schellink
            Reporter:
            Finn Bock
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development