Tapestry
  1. Tapestry
  2. TAPESTRY-1906

DropdownDatePicker and DropdownTimePicker overwrite html tag used in template

    Details

      Description

      The DropdownDatePicker and DropdownTimePicker components overwrite the HTML tag specified in the page template with <div>. Instead they should use the tag specified in the template.

      DropdownTimePicker.java line 61:

      writer.begin("div");

      should be

      writer.begin(getTemplateTagName());

      DropdownDatePicker.java line 75:

      writer.begin("div");

      should be

      writer.begin(getTemplateTagName());

      1. TAPESTRY-1906.txt
        2 kB
        Ulrich Stärk

        Activity

        Hide
        Andreas Andreou added a comment -

        Done, but not for the original requested reason ( it's not difficult to fix styling in other ways... )
        I just found out that using input as template tag minimizes the popup flicker when dojo creates
        the true input box.

        Show
        Andreas Andreou added a comment - Done, but not for the original requested reason ( it's not difficult to fix styling in other ways... ) I just found out that using input as template tag minimizes the popup flicker when dojo creates the true input box.
        Hide
        Ulrich Stärk added a comment -

        No, I noticed that my Dropdown*Pickers were put on a new line although I specified a <span> element to be used as the anchor. When I inspected the DOM tree in Firefox I saw, that Dojo replaces the anchor element with a span element and I was even more puzzled because there shouldn't be a line break with a <span> element. It seems that Firefox (haven't tested IE or any other browser) puts the <div> element on a new line because it's a block element and leaves it there although it gets replaced with a <span> element (non-block) later on. So I either need to force the <div> elements to be non-block (display: inline) or even better make Tapestry use the HTML element I provide which in my case is <span>.

        Uli

        Show
        Ulrich Stärk added a comment - No, I noticed that my Dropdown*Pickers were put on a new line although I specified a <span> element to be used as the anchor. When I inspected the DOM tree in Firefox I saw, that Dojo replaces the anchor element with a span element and I was even more puzzled because there shouldn't be a line break with a <span> element. It seems that Firefox (haven't tested IE or any other browser) puts the <div> element on a new line because it's a block element and leaves it there although it gets replaced with a <span> element (non-block) later on. So I either need to force the <div> elements to be non-block (display: inline) or even better make Tapestry use the HTML element I provide which in my case is <span>. Uli
        Hide
        Andreas Andreou added a comment -

        What kind of tag do you want to use with it?
        I'm wondering, are you trying to make it look good with js disabled?

        Show
        Andreas Andreou added a comment - What kind of tag do you want to use with it? I'm wondering, are you trying to make it look good with js disabled?
        Hide
        Ulrich Stärk added a comment -

        Attached a patch for this issue

        Show
        Ulrich Stärk added a comment - Attached a patch for this issue

          People

          • Assignee:
            Andreas Andreou
            Reporter:
            Ulrich Stärk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development