Guest_imported
New member
- Jan 1, 1970
- 0
I am having problem getting the complete array from my html form to my beans. The situation here is as follow:
1) I have a dynamic form that will loop itself. Eg. The user key in 5 and my jsp will generate 5 forms. Each form will be declared as 2-dimensional array say in this case,
2) Problem, how to get the value into my beans? I want to get all the value into my bean so that I can use it. I uses the set and get method for my normal (not array) values.
3) This is what I wrote in my bean.
4) Somehow, nothing goes into my myArray.
Any solution for this?
Many thanks in advance,
gene_
1) I have a dynamic form that will loop itself. Eg. The user key in 5 and my jsp will generate 5 forms. Each form will be declared as 2-dimensional array say in this case,
Code:
String[][] newForm = new String[userKeyIn][2];
2) Problem, how to get the value into my beans? I want to get all the value into my bean so that I can use it. I uses the set and get method for my normal (not array) values.
3) This is what I wrote in my bean.
Code:
private String[][] myArray;
public void setNewForm(input[][]){
myArray = new String [getUserKeyIn()][2];
myArray = input;
}
public String[][] getNewForm(){
return myArray;
}
Any solution for this?
Many thanks in advance,
gene_