myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sandeep gururaj" <>
Subject RE: How to Hide Columns of a Table
Date Mon, 06 Aug 2007 13:06:42 GMT
I guess you should try changing your Data Model such that your input to
the table is only the data that you want to see on the page and other
details to be obtained only for the selected rows.


-----Original Message-----
From: Caroline Jen [] 
Sent: Monday, August 06, 2007 6:27 PM
Subject: How to Hide Columns of a Table 

I am coding in JSF and I rendered a table using the
<h:dataTable ...> tag.

Because once a row is selected, I need the cell value
in some columns (poeColumn, distanceColumn, and
directionColumn). But those columns have to be hidden
in the web page according to client's requirement. 
For I need the cell values of the hidden columns, I
cannot use the rendered="false" attribute.

What I tried was 

<h:dataTable .... columnClasses="codeColumn,
descriptionColumn, poeColumn, distanceColumn,
directionColumn" ....>

and render all columns. In my CSS, I have

.poeColumn{ display:none;}
.distanceColumn{ display:none;}
.directionColumn{ display:none;}

although the 'values' in those columns are hidden, I
cannot get rid of the 'heading' of those columns (I
did not even specify the 'header').

What is wrong? What should I do? 

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket:
mail, news, photos & more.

View raw message