aspose file tools*
The moose likes JSF and the fly likes scrollableDataTable header values to be adjusted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "scrollableDataTable header values to be adjusted" Watch "scrollableDataTable header values to be adjusted" New topic
Author

scrollableDataTable header values to be adjusted

Tanu Gulati
Ranch Hand

Joined: Oct 06, 2008
Posts: 113

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"

data="businessSupported"></a4j:commandLink>
<h:graphicImage url="/css/images/scroll-down1.gif"></h:graphicImage>
</h:panelGroup>

</f:facet>
</rich:column>



thanks
Tanu Gulati
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Tanu Gulati
Ranch Hand

Joined: Oct 06, 2008
Posts: 113

Tim, I tried first and second option but did not work

I could not understand your third option what is the meaning of it ??
Place the text in a subsidiary element within the commandLink element body
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21



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.
Tanu Gulati
Ranch Hand

Joined: Oct 06, 2008
Posts: 113

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.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

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.
 
wood burning stoves
 
subject: scrollableDataTable header values to be adjusted