Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

text-align in <h:dataTable>

843842Oct 26 2005 — edited Oct 26 2005
I created a data table with four columns. By default, the text of each column of the table is left aligned.

I am trying to make the text of certain columns of the table to be 'centered'. And I tried to use the columnClasses in the dataTable tag to do it but failed (i.e. all text is still left aligned.). Maybe someone could help me in spotting the mistake that I made.

My JSP:
<html>
<head>
  .....
    <link href="../includes/MilPDS_Style.css" rel="stylesheet" type="text/css">
</head>
<body>
    <f:view>
        <h:form id="errorLog">		
  ......
            <h:dataTable value="#{logManagementBean.errors}" var="eInfo"  	rowClasses="row1,altRow" columnClasses="nameColumn, numberColumn, timeColumn, messageColumn">

  ......
            </h:dataTable>
        </h:form>
    </f:view>
</body>
</html>
I swear that I can access the stylesheet MilPDS_Style.css because the rest of the specifications in the stylesheet get picked up successfully. And my MilPDS_Style.css has:
.nameColumn {
    text-align: left; 
}
.numberColumn {
    text-align: center;
}
.timeColumn {
	text-align: center;
}
.messageColumn {
	text-align: left;
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2005
Added on Oct 26 2005
2 comments
152 views