Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes How to bind data in inputText field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
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: 244
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: 4968
    
    1

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to bind data in inputText field