I need to pass a string array to my servlet through hiddenitem. This is what I've done so far:
String[] userListArray = ...;
display.getDataForm().getField("Records").setAttribute("Records",userListArray);
On server side, I tried to retrieve the data but it cannot retrieve the array:
String[] attributes = (String[]) request.getAttribute("Records");
I also tried to use multiple HiddenItem with the same name but different values. On the sever side, I used request.getParameterValues("Record"). Still get nothing.
HiddenItem item1 = new HiddenItem("Record");
HiddenItem item2 = new HiddenItem("Record");
item1.setValue("value1");
item2.setValue("value2");
Thanks!
String[] userListArray = ...;
display.getDataForm().getField("Records").setAttribute("Records",userListArray);
On server side, I tried to retrieve the data but it cannot retrieve the array:
String[] attributes = (String[]) request.getAttribute("Records");
I also tried to use multiple HiddenItem with the same name but different values. On the sever side, I used request.getParameterValues("Record"). Still get nothing.
HiddenItem item1 = new HiddenItem("Record");
HiddenItem item2 = new HiddenItem("Record");
item1.setValue("value1");
item2.setValue("value2");
Thanks!
Comment