This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread 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 | 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

How to bind data in inputText field

S Majumder
Ranch Hand

Joined: Jun 03, 2009
Posts: 346
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 ,
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: How to bind data in inputText field
It's not a secret anymore!