• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

h:dataTable and h:inputText problem

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

I have one dataTable which contains inputText fields in one of its column. Now I want to get values of inputText in my bean. How do I get these values in my bean?

When I see html output of the page IDs generated for inputText is something like this

formID ataTableID:**:inputTextID where ** is the number generated by JSF.

So I donot understand how to get it from requestParameter Map. Is this the only way or Is there any other way of doing this?

Thanks
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My code in this thread is doing that. Most JSF tutorials will have similar examples.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeff,

I've been using

JsfHelper.getParameter("formID:inputtextID");

to get value of the form elements .



as per my analysis, this is working fine.
Is there any drawback or efficiency issue with this ??

Jeff , pls , reply.

Thanks.
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you can do that, but you're bypassing much of the power of the JSF
framework. Why aren't you binding it to a property of a backing bean?
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic