• 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 pick values from data table....

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to create a page in which i have 3 drop downs and 1 radio button.
When user select value in these drop downs and button, i populate some data in a data table..
Now the data in data table are in form of links... i am calling a action on this link.
What i want is value of drop downs ,radio button and field itself in action.
I have created fields for each drop down and radio button and mapped them.
BUT I AM GETTING NULL there....
Please help..
thanks in advance
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not a lot to go on Vicky (it's always best to give people some code fragments to see what you are doing), but I'll try to help.
What, exactly, is null? The combo/radio values? Table values? Link value? I'll try to quickly cover all the bases.

Obvious question: Do you have getters AND setters for each value? e.g.
Is you bean still in scope (it's not "Request" scope or something)?

Next, is it just one bean for everything; or is the bean handling the action a separate one? If it's separate, then you'll need to get access to the bean that knows the values for you combos and radio button. There may be a better way (I'm new to JSF too) but this is what I do:
You can now simply do "otherBean.getCombo1Value()" (or whatever).

Finally, remember that you can pass parameters to a actions.
and then access it like this

i hope this helps,

J.
 
vicky Aggarwal
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Jason...
I appreciate you for your help ...
I have solved my problem .. I will take care of your advise...
What i need to do, was add "binding" in data table. it maps my selected value to my bean ....

 
reply
    Bookmark Topic Watch Topic
  • New Topic