news <[EMAIL PROTECTED]> wrote on 12/07/2005 03:39:11 PM:
>
> Thanks for the answer Geeta....
> Adding them in the <h:column> will show up in the html file, but it
> won't give the results i want. the table looks weird if i do that...
>
> I think the style suggestion is the way to go, but...now this turned
> into a style question!
> I hope you can still help me with that!
> so how do i specify the width of individual column in the style ?
Here's an example from my jsp:
<t:dataTable id="items" var="assignment"
value="#{assignmentList.assignments}" rowCountVar="rowsCount"
headerClass="searchTable_Header" footerClass="searchTable_Footer"
columnClasses="searchTable_Column,searchTable_Column_Centered">
<h:column>
<f:facet name="header">
<h:outputText value="Patient Name" />
</f:facet>
<h:outputText value="#{assignment.contactName}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Activity/Call" />
</f:facet>
<h:outputText value="#{assignment.urlForDisplay}" />
</h:column>
</t:dataTable>
My style sheet has:
.searchTable_Column_Centered {
font-family : Arial, Helvetica, verdana, Geneva, sans-serif;
font-size: 12px;
background-color: #FFFFFF;
color: #000000;
padding: 2;
text-align: center;
border: none;
}
.searchTable_Column {
font-family : Arial, Helvetica, verdana, Geneva, sans-serif;
font-size: 12px;
font-weight: bold;
background-color: #FFFFFF;
color: #000000;
padding: 2;
text-align: left;
border: none;
}
(You should be able to add something like width:760px above to get the width you want).
And up top in my layout.jsp (I use tiles):
<link rel="stylesheet"
href="<h:outputText value="#{facesContext.externalContext.requestContextPath}/style/basic.css" />" />
Hth,
Geeta
- Re: <f:verbatim> problem gramani
- Re: <f:verbatim> problem hilz
- Re: <f:verbatim> problem Paul Klaer