I want to use one property for firstname but save in one form 5 firstname .

how can I save 5 firstname in one h:form using one property
<h:form>
<h:inputText  id ="firstname" value ="#{bean.firstname}">
<h:inputText  id ="firstname1" value ="#{bean.firstname}">
<h:inputText  id ="firstname2" value ="#{bean.firstname}">
<h:inputText  id ="firstname3" value ="#{bean.firstname}">
<h:commandButton id="save" action="#{bean.save}" value="Save" />   

Hi,
I tried out this...
But now I am getting following exception
javax.servlet.ServletException: Base is null: .optionalCover
     javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
ManageBean code
public String[] getOptionalCover() {
public String getOptionalCover(int i) {
public void setOptionalCover(int coverId, String values) {
Jsp code
<h:inputText value="#{homeCoverViewBean.optionalCover[420]}" />
<h:inputText value="#{homeCoverViewBean.optionalCover[500]}" />
<h:commandButton value="Save" action="#{homeCoverViewBean.saveAndNext}" />
Please suggest.

Similar Messages

Maybe you are looking for