File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes rich:dataTable filter textfield width Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "rich:dataTable filter textfield width" Watch "rich:dataTable filter textfield width" New topic

rich:dataTable filter textfield width

Db Riekhof

Joined: May 21, 2009
Posts: 10

Seems like a simple problem but it has me stumped. How do you set the width of the default filter textfield that appears in the header row? The filter textfield is taking up too much horizontal space in a few columns. We're using richfaces 3.2.2.CR4.

I'm using the default filtering like this:

Db Riekhof

Joined: May 21, 2009
Posts: 10
Spoke to a co-worker a little more adept at CSS than me, he showed me how to look up the textfield's style class using Firefox's Firebug Inspect Element. The fix was to add this to our .css:

.rich-filter-input {
width: 100%;

I think it was set to auto by default. 100% works a little better for our needs.
I agree. Here's the link:
subject: rich:dataTable filter textfield width
It's not a secret anymore!