You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Odelya Yom-Tov Glick <od...@jpost.com> on 2008/11/30 15:23:56 UTC

Using multibox to indicate checked value

Hi guys

I have this ActionForm

public class InterestsForm extends ActionForm {
	private String[] selectedItems = {}; 
	private String[] items = {"business","htech""};
      private String[] userPreviousSelectedItems= {"business"};
public String[] getSelectedItems() { 
	  return this.selectedItems; 
	} 
	public void setSelectedItems(String[] selectedItems) { 
	  this.selectedItems = selectedItems; 
	}

}

And this form:
<logic:iterate indexId="counter" name="interestFrom" id="item"
property="items">
<html:multibox property="selectedItems" >
<bean:write name="item" />
</html:multibox>
<bean:message key="interests.<bean:write name="item" />" />
</logic:iterate>


I would like to check the items that the user checked previously and I
stored them in userPreviousSelectedItems (I can also create a collection
instead).

How can I do it?

Thanks

Odelya



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org