• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scrollableDataTable header values to be adjusted

 
Ranch Hand
Posts: 113
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>


 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Tanu Gulati
Ranch Hand
Posts: 113
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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
Posts: 113
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic