RE: Multibox problem

2005-07-06 Thread Shyam . Tummala
Hi-

Thanks for the response.

The map is in helper class and i dont want my helper class to know 
anything about struts or actionForm.

Thanks,
Shyam




"Apte, Dhanashree (Noblestar)" <[EMAIL PROTECTED]>
07/06/2005 11:45 AM
Please respond to "Struts Users Mailing List"
 
To: "'Struts Users Mailing List'" 
cc: 
Subject:RE: Multibox problem



Code where i put the values back:
map.put("districtIds", stringArr);
where stringArr is an array of what the user selected.


-> This is not the same as calling setDistrictIds. You need to call
setDistrictIds(stringArr) explicitly.



Multibox problem

2005-07-06 Thread Shyam . Tummala
Hi-

I am having a problem with repopulating multiboxes.

Scenario:

My application is a wizard based one. User clicks on a couple of 
checkboxes(multibox) and does a submit and after a couple of screens he 
wants to come back to the checkboxes screen and the way i do is, i save 
the values he clicked and then when he wants to come back i store those 
values in a list and then to the request with the same name as that of 
multibox, but the multiboxes are not selected and there is no tag in 
multibox using which i can say that.

For Eg:

My JSP page:

10Kansas City
11Dallas
12San Francisco

My form Bean:

private String [] districtIds = null;

public void setDistrictIds(String [] districtIds) {
this.districtIds = districtIds;
}

public String [] getDistrictIds() {
return this.districtIds;
}


Code where i put the values back:
map.put("districtIds", stringArr);
where stringArr is an array of what the user selected.

Thanks,
Shyam.