Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-12443

<h:inputText/> and <h:inputTextarea/> styleClass attribute being overwritten when using <h:outputStylesheet/> by Skinning

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.2.2.Final
    • Fix Version/s: None
    • Component/s: skinning
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Create a page which includes a <h:inputText styleClass="invalidInput"/>
      and include the following CSS to a file which will be included using

      <h:outputStylesheet name="test.css" library="css"/>
      
      input.inputInvalid, textarea.inputInvalid{
          border: 1px solid red;
      }
      

      This will not produce the CSS specified. However, if you place the CSS directly in the page it will work.

      <style type="text/css">
          input.inputInvalid, textarea.inputInvalid{
              border: 1px solid red;
          }
      </style>
      
      Show
      Create a page which includes a <h:inputText styleClass="invalidInput"/> and include the following CSS to a file which will be included using <h:outputStylesheet name= "test.css" library= "css" /> input.inputInvalid, textarea.inputInvalid{ border: 1px solid red; } This will not produce the CSS specified. However, if you place the CSS directly in the page it will work. <style type= "text/css" > input.inputInvalid, textarea.inputInvalid{ border: 1px solid red; } </style>
    • Workaround Description:
      Hide

      Place the CSS directly in the page.

      <style type="text/css">
          input.inputInvalid, textarea.inputInvalid{
              border: 1px solid red;
          }
      </style>
      
      Show
      Place the CSS directly in the page. <style type= "text/css" > input.inputInvalid, textarea.inputInvalid{ border: 1px solid red; } </style>

      Description

      The styleClass attributes are being overwritten by the skinning from the application. This is in direct contradiction to Section 6.3 of the Developer Guide which states:

      Custom style classes

      Individual components can use the styleClass attribute to redefine specific elements. These components then use the styles defined in a CSS file instead of the standard look for components as defined by the ECSS stylesheets.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jyeary John Yeary
              • Votes:
                5 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: