[EMAIL PROTECTED] wrote:

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


Geeta... thank you for your input one more time...
After some investigation, it seems this is not acheivable using stylesheets.
see this:

http://www.notestips.com/80256B3A007F2692/1/TAIO5WFG7K

and more specifically the part where it says:

"The problem is that this affects ALL cells, individual columns cannot be targeted. The solution is not inherently CSS based but HTML based, the way to solve this issue is by inserting the underused <colgroup> and <col> tags into the table markup."


So there is no way to control the column widths individually using the css style...
so we're back to square one... I have to do it using this approach:

    <colgroup>
        <col width="xxx">
        <col width="xxx">
    </colgroup>

So now i need to figure out how to get this to appear in my html table.
Any solution or work around is appreciated.

thanks

Reply via email to