jsf - CSS does not apply to table rows -


i trying make odd , rows having different color. here code:

 <h:head>     <h:outputstylesheet library="css" name="styles.css"  />      <title>facelet title</title> </h:head> <h:body>     <h:form>         <h:datatable   id="accountstable" value="#{currentcustomer.accounts}" var="accounts" styleclass="accountstable" headerclass="accountstableheader" rowclasses="accountstableoddrow,accountstableevenrow" >             <h:column>                 <f:facet name="header">account number</f:facet>                     #{accounts.accountnumber}             </h:column>             <h:column>                 <f:facet name="header">currency</f:facet>                     #{accounts.accountcurrency}             </h:column>             <h:column>                 <f:facet name="header">iban</f:facet>                     #{accounts.iban}             </h:column>             <h:column>                 <f:facet name="header">account number</f:facet>                     #{accounts.accountnumber}             </h:column>         </h:datatable>     </h:form> </h:body> 

and css file:

root {      display: block; }   .accountstable{      border-collapse:collapse;    border:1px solid #000000;    background-color: red; }  .accountstableheader{        background:none repeat scroll 0 0 #b5b5b5;    border-bottom:1px solid #000000;      padding:2px; }  .accountstableoddrow{    text-align:center;   background:none repeat scroll 0 0 #fffffff;    }  .accountstableevenrow{    text-align:center;    background:none repeat scroll 0 0 #d3d3d3; } 

and file organization:

enter image description here

but rows still white. can me this?

thanks

if want use

<h:outputstylesheet library="css" name="styles.css"  />  

you need following. create folder called resources under web pages , place folder css in it. styles not being applied because it's looking in folder (resources) css folder.

check link sort of see visual description of mean. first picture see (the directory one).

alternatively can

<h:outputstylesheet name="/css/styles.css"  />  

also check link see how library should used.

what jsf resource library , how should used?


Comments

Popular posts from this blog

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -