This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes How to bind data in inputText field Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to bind data in inputText field" Watch "How to bind data in inputText field" New topic
Author

How to bind data in inputText field

S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 241
Hi ,
every body,

I am facing a problem related to inputText.
I am creating text fields inside a <c:forEach> loop .But I can not get value from each text field.
I want to take each input text fields value and initialize in a List .

Suppose I am creating 4 inputText fields , in my backing bean I have one List of size 4 , I want to take each input text's value and insert in the List . Is it possible ?

Here is the jsf code :



Here I am taking the "valueList" as a List<String> and infoList as a List<SelectItem> , both are same size.
Can it be possible to take each input Text fields value and insert in to the List ?

If there is any other procedure please let me know .

Thanks ,
SB
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4967

I think you might have aproblem in the fact that each textField will not have a unique id, so there wouldn't be a unique identified for JSF to use. You might want to bind to the list instead.

-Cameron McKenzie


Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to bind data in inputText field
 
Similar Threads
Enable dynamic inputText
Help with jstl forEach spring 2.0 binding
Please Help : Problem getting submitted value for dynamic input text field
Server side validation of inputText
Trying to bind inputText fields from an a4j:repeat tag to java code