Text input for multi-valued attribute

Posted by Sean on Stack Overflow See other posts from Stack Overflow or by Sean
Published on 2010-04-23T17:19:54Z Indexed on 2010/04/23 17:23 UTC
Read the original article Hit count: 220

Filed under:
|

I need to create an input form that will allow a user to enter any number of values for a particular attribute.

I've tried several approaches, all of which seem to have various levels of failure. The latest model bean looks something like:

public class Product {
  private String name;
  private String[] tags;

  ...accessors...
}

The input fields look something like:

<h:inputText id="name" value="#{product.name}"></h:inputText>
<h:inputText id="tag0" value="#{product.tag[0]}"></h:inputText>

My plan was to allow the user is to use javascript to add additional form fields as needed.

This type of setup gives me a 'Target Unreachable' error. What am I missing?

I am using JSF 1.1 on WebSphere 6.1

© Stack Overflow or respective owner

Related posts about jsf

Related posts about java