• Post Reply Bookmark Topic Watch Topic
  • New Topic

collection binding with input text  RSS feed

 
vikram s
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can someone tell me how to bind a collection to a input text.

<h:inputText id="slotValIn" value="#{objCollection.objectBean.fields.values}"
size="100" />

objCollection is managedbean
i am trying to map it to
public List getValuesList() {
return values;
}

public void setValuesList(List list) {
values = list;
}

this thing below works
<h:inputText id="slotTypeNameIn" value="#{objCollection.objectBean.fields.name}"
size="100"/>
it is mapped to
public String getName() {
return name;
}

public void setName(String par1) {
name = par1;
}

thanks,
vikram
 
Josh Juneau
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure that is a possible option. Why are you trying to map a collection of items with a single inputText component? Usually with a collection of items it makes more sense to map to a select item list or a list box of items. I am relatively sure that the inputText component is meant only for a single input item.

Josh Juneau
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!