1 Reply Latest reply on May 4, 2011 5:41 AM by P18Mar ch ;)

    StyleClass not working as .css file in jsf ?

    P18Mar ch ;) Newbie

      I have problem in jsf, how can I use styleClass dummy.css file in my jsf dummyJsf.xhtml file.

      If I defined style internally to every component its working but its a tedious work to use it again and again.

      I make a .css file and in eclipse preview it show class attribute but when I execute this jsf it not shows changes why?

       

       

      /////////---------------------------css File--------------

      .logInFootLabel {

          FONT-SIZE: 12;

          FONT-FAMILY: Courier New;

          TEXT-ALIGN: center;

          font-style: italic;

          color: MediumVioletRed

      }

       

       

      ------------------------- JSF -------------------------------

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

          xmlns:ui="http://java.sun.com/jsf/facelets"

          xmlns:h="http://java.sun.com/jsf/html"

          xmlns:f="http://java.sun.com/jsf/core"

          xmlns:a4j="http://richfaces.org/a4j"

          xmlns:rich="http://richfaces.org/rich"

          xmlns:xforms="http://www.w3.org/1999/xhtml">

       

          <link href="/styles/dummyCSS.css" rel="stylesheet" type="text/css" />

       

       

       

       

      <h:form  >

           <h:panelGrid >

                           <h:outputText value="Log in problem? Please contact your Manager / Supervisor." styleClass="logInFootLabel"/> // Working

                           <h:outputText value="Log in problem? Please contact your Manager / Supervisor." styleClass="logInFootLabel"/> // NotWorking

            </h:panelGrid>       

          </h:form>

      </ui:composition>

       

       

       

      with  regards:

      Pankaj S (Behind B.D. Flour Mill Ambala Cantt  Haryana India )