• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Table in a List Box

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am new to JSF technology. I have a doubt. The following are the details.

Doubt: How to implement a tabular structure in a list box. I should be able to select the entire row like selecting an item in a list box.

My Requirement: In the left side there is a list box and two pull down lists and a add button. A row (with three elements) should be added to the table which is in the list box after selecting an item in the listbox, and in the two pull down lists and by clicking on Add button. After adding one or more rows in the list box, I should be able to select a row in the table like in list box.

Can any one please tell me whether this is possible or not. Are there any alternatives for this. Please help me.
Thank you.
 
Author
Posts: 3473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not extend the JSF Table into a custome component with chckboxes on the left to select and unselect rows.
 
Nanda Kishore Akkala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Arul,

As per our client requirement, the requirement should be as follows.

My Requirement: In the left side there is a list box and two pull down lists and a add button. A row (with three elements) should be added to the table which is in the list box after selecting an item in the listbox, and in the two pull down lists and by clicking on Add button. After adding one or more rows in the list box, I should be able to select a row in the table like in list box (The behaviour should be like List Box).

Can you please tell me whether this is possible or not...
Can we achieve this using custom components?
Please suggest me.


Thank you.
 
Nanda Kishore Akkala
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one give suggestion regarding using a table in a list box. Or if there are any alternatives, please tell me. Thank you.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No such component exist in a standard JSF implementation and other component libraries which I am aware of. Such an element does also not exist in standard HTML. You however can create/simulate a tabular listbox using DHTML (HTML with some Javascript which alters the HTML DOM).

First, start off with writing such a thing using DHTML. Once you got it working, then write a custom UIInput (UISelectOne? UISelectMany?) component which contains the core logic behind the component, a custom UIComponentELTag (or UIComponentTag if you're using JSF 1.1 or older) which backs the tag element and a custom Renderer which renders the desired DHTML to the response. Finally define it all in your custom TLD file so that you can use it as a new JSF taglib in your JSP file.
[ August 24, 2008: Message edited by: Bauke Scholtz ]
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic