Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-326

t:dataList does not style <li> elements

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.2
    • None
    • None
    • All (I presume)

    Description

      When adding a style class attribute to a t:dataList you can output something like

      <ul class="myCssClass">
      <li>Some content</li>
      </ul>

      but notice here that the <li> element has no style class attribute. This makes it impossible to style the <li> elements (without styling all <li> elements on the page).

      This bug does not only give us less styling flexibility it also means that you cannot guarantee the same rendering of an HTML list across browsers. From my testing it looks very much like Mozilla Firefox and Internet Explorer have different default margins around a <li> element, and since the t:dataList does not allow me to address this, I cannot guarantee the precise same rendering across browsers.

      You might think that a simple workaround would be to simply style the <li> element without a style class, but this is problematic, because then all <li> elements on the same page are styled - even the ones you did not intend to style.

      A quick fix would be to output the specified styleClass attribute as the style class of both the <ul> and the <li> element, however, it is my opinion that the ideal solution to this problem is to add a new attribute to t:dataList called itemStyleClass which contains the style class to be rendered on the <li> element.

      For what it is worth, it would mean a lot to my project if you would address this issue.

      Thank you for a great library!

      Randahl

      Attachments

        1. itemStyleClass.zip
          3 kB
          Sharath Reddy

        Activity

          People

            mmarinschek Martin Marinschek
            randahl Randahl Fink Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: