Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to bind data in inputText field

 
S Majumder
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic