hi,
I have a scrollableDataTable with header values like "Business Supported", "functional role & title".
now i have to show header values in two separate line like "Business" and "supported" should come in two different lines in header. any suggestions?
<rich:column sortable="false" width="50px">
<f:facet name="header">
<h:panelGroup>
<a4j:commandLink value="Business Supported"
Generally speaking, if you make the column narrow enough, the browser's HTML formatter will automatically drop down to a second line. I'm presuming that in this case that didn't work, since that's basically what you're set up for.
The next-most-promising approach is to place the value text as body text between open/close commandLink tags, if that's permitted instead of using the "value=" attribute. I'm pretty sure it is, because of the third option, which is:
Place the text in a subsidiary element within the commandLink element body. I believe that you can do this to support more complex "hot spots" such as mixed text and graphics.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
One way or another, however, it is possible to do what you want, though - I've done it more than once myself!
You might want to experiment with the width setting, though. I'm not sure 50 pixels is enough to hold the text even when folded. If your settings are too narrow, the system may just be ignoring them.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
hm..I tried but above solutions also does not work. actually in my case columns are dynamic in nature so even though on screen "Business Su" is visible, I can drag column further to see full name but instead of it want to see "Business" and "Supported" come in two lines(when space is less) and shown in one line when column is dragged (using mouse) to increase its width.
Uh-oh. I think this has to do with the fact that it's a RichFaces resizeable region and not straight HTML.
There's a CSS "fold" option for text that MIGHT help, but otherwise I think it's going to need to be solved in terms of RichFaces.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Don't get me started about those stupid light bulbs.