This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Column class in prime faces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Column class in prime faces" Watch "Column class in prime faces" New topic
Author

Column class in prime faces

Janardhan Chowdary
Greenhorn

Joined: May 21, 2012
Posts: 15

Hi Friends,

There is a class named with 'Column' in prime faces api.

Have any body used any methods like 'getWidth()', 'setWidth()' to customize the columns ?

Please let me know if you have any examples for the same.

Thanks,

He who cannot obey himself will be commanded. That is the nature of living creatures.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

Usually a "getWidth/setWidth" on a JSF component won't work, because attributes such as "width" are set via EL expressions and therefore you have to setup a rather nasty - and mutable - EL processing environment to get the right data in. Just passing a simple number width value isn't enough.

So instead, you would usually be better off setting the width to a backing bean property like so:


Then instead of pushing the width into the component, the component will pull the width from the backing bean.


Customer surveys are for companies who didn't pay proper attention to begin with.
Janardhan Chowdary
Greenhorn

Joined: May 21, 2012
Posts: 15

Thanks dude!
 
jQuery in Action, 2nd edition
 
subject: Column class in prime faces
 
Similar Threads
How do I map composite primary key/foreign key
DefaultTableModel and Multiple Selections.
copy value of input text to another input text
Display the prime factors of a number using sets
tabindex is not working in jsf