You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Caroline Jen <ji...@yahoo.com> on 2007/08/06 14:57:29 UTC

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. 
http://mobile.yahoo.com/go?refer=1GNXIC

RE: How to Hide Columns of a Table

Posted by sandeep gururaj <sa...@Chordiant.com>.
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.

Thanks
~Sandeep

-----Original Message-----
From: Caroline Jen [mailto:jiapei_jen@yahoo.com] 
Sent: Monday, August 06, 2007 6:27 PM
To: users@myfaces.apache.org
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. 
http://mobile.yahoo.com/go?refer=1GNXIC