• 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

display

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

I am using jsf ri 1.1 and tomahawk_1.0. I just need to alter the diplay in the dropdown list. The dropdown list displays the customer names. In the customer names there are parent customers and child customers. I just want to display the parent customer and beneath that corresponding child customers . For example,

xxx Parent
tab space xx1
tab space xx2
tab space xx3
yyy Parent
tab space yy1
tab space yy2
tab space yy3

List contains database driven values. I am trying to use css for this display. But I am not sure how can I display according to parent and child since its data driven.

Here is the jsp selectItems tag I used :



In the managed bean :



The tab space is not displaying in the dropdown list box.
Please tell me have you got any thoughts on it. I am not sure where I have got mistaken.

Thanks,
Joe.
 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm there is a tricky workaround for your issue

while(itr.hasNext()) {

usr = (UserCustomer) itr.next(); if(usr.getParentCustomerId() == 0) {
s = ""; }else {
s = "����� ";
}

NOOO, the else block is not spaces, instead of hitting space bar, fill spaces using <alt>255.


I think it will do the job for you !!

Thanks,
[ September 21, 2006: Message edited by: Rajeev Ravindran ]
 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rajeev Ravindran:
hmm there is a tricky workaround for your issue

while(itr.hasNext()) {

usr = (UserCustomer) itr.next(); if(usr.getParentCustomerId() == 0) {
s = ""; }else {
s = "����� ";
}

NOOO, the else block is not spaces, instead of hitting space bar, fill spaces using <alt>255.


I think it will do the job for you !!

Thanks,

[ September 21, 2006: Message edited by: Rajeev Ravindran ]




Hi Rajeev,

Thank you very much for your reply. I am sorry to say that, the solution you gave doens't seem to work. I have given like this :

Hope this is what you meant. The list displays like
Parent
<alt>255Child0
<alt>255Child1

Thanks,
Joe.
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
grrrr just kidding

i meant to say press the alt key and hit 255 (just like you use <ctrl>C for copy), its an ascii for blank space but its not like hitting space bar !

Thanks,
[ September 22, 2006: Message edited by: Rajeev Ravindran ]
 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rajeev Ravindran:
grrrr just kidding

i meant to say press the alt key and hit 255 (just like you use <ctrl>C for copy), its an ascii for blank space but its not like hitting space bar !

Thanks,

[ September 22, 2006: Message edited by: Rajeev Ravindran ]



ooops.... silly me .
I got it
Very thoughtful of you Rajeev.
Thanks, :thumb:
[ September 22, 2006: Message edited by: Joe Jose ]
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there has to be a better way of doing this.
see http://www.w3schools.com/tags/tag_optgroup.asp - thats what you need. i am not sure if it is possible to print out an "optgroup" using myfaces's h:selectOneMenu tag or not, but it would be worth spending some time researching into it.
[ September 24, 2006: Message edited by: Lynette Dawson ]
 
Joe Jose
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lynette Dawson:
there has to be a better way of doing this.
see http://www.w3schools.com/tags/tag_optgroup.asp - thats what you need. i am not sure if it is possible to print out an "optgroup" using myfaces's h:selectOneMenu tag or not, but it would be worth spending some time researching into it.

[ September 24, 2006: Message edited by: Lynette Dawson ]



Thank you very much for the information Lynette .
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is something new for me too. Thanks for the info !!

Thanks,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic