• 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

How to format the text in a column using displaytag?

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi All,

I am having a problem in display tag. In my application am having a drop down list called "city" with different values hyd, b'lore,and etc.
So when we select one option from the city drop down list and click on submit then a table data is displayed using display tag.
The table data contains diff columns like city name, state,description and etc..
But when i select city as Banglore it is displaying the table data correctly but the data in description column is not displaying in the correct format. It is happening with only when i select particular Banglore. Hw can i format the text in that column..?

description(hyd)
-------------
aaaaaaaaaaa
aaaaaaaaaaa
aaaaaaaaaaa

description(chennai)
-------------
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa

description(when i select banglore)
--------------
aaaa
aaaaa
a
aaa
aaaaaaaa
aaaa
aaaaaa
aa
aaaaaaaaaaaa


In the above table the data in the description column for both chennai and hyd are displaying in the good format.

But in case of Banglore the data is not displaying properly.. That is actually the data can be adjusted in maximum of 3-4 lines but here the data is adjusted inin morethan 6-7 lines. This is only happening with this particular record.. Hw can i do this?? Please Give me any ideas...
 
Vidya Gupta
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I wrote the tag like below.. It is displaying the data in description column in single line..

<display:column property="description" class="normalfont" style="width:2%;white-space:nowrap;"/>

Can any body suggest me what more values can i use in style attribute of display tag..
 
Vidya Gupta
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I used different values for style attribute like,

style=white-space:nowrap / normal / pre / pre-line / pre-wrap / inherit;
sytle=word-wrap:break-word;
style=word-break:break-all;

But the text format is not changing correctly... Please suggest me if some more values are there to format the text.

Thanks,
Vidya
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic