简体   繁体   中英

Apache MyFaces Trinidad: <tr:column/> generate html

The html that generate from tr:table contains th for the header and td for the row data which is good.

my problem is that i want to style to the 'th' element

When I added style to tr:outputText this does not effect.

The style that I trying to add is - text-align:right

how can i do this how can I control the html that being generated from jsf (Trinidad is this case)

my code

 <tr:table value="#{myManagedBean.allEmployees}"
      bandingInterval="2" banding="row" var="emp">
  <tr:column>
      <f:facet name="header">
      <tr:outputText value="Name"/>
     </f:facet>
     <tr:outputText value="#{emp.ename}"/>
  </tr:column>
  <tr:column>
    <f:facet name="header">
     <tr:outputText value="Department Number"/>
    </f:facet>
    <tr:outputText value="#{emp.deptno}"/>
  </tr:column>
</tr:table>

Any one ?

you can fiddle around with the trinidad skin selectors. So put this inside your trinidad-skin.css:

af|column::sortable-header-text
{
    text-align: right;
}

Further Information for trinidad-skinning: http://myfaces.apache.org/trinidad/skin-selectors.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM