You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Ralph Schaer <sc...@ess.ch> on 2000/06/26 15:08:49 UTC
checkbox tag
Hi
I've made some changes to the changebox tag (remember the discussion a few
days ago).
With the changes the tag supports the two mapping styles:
1. to a boolean property
<struts:checkbox property="administrator">administrator</struts:checkbox>
private boolean admin = true;
public boolean getAdministrator() {
return admin;}
public void setAdministrator(boolean admin) {
this.admin = admin;}
2. to an array
<struts:checkbox property="os" value="1">Win98</struts:checkbox>
<struts:checkbox property="os" value="2">Win2000</struts:checkbox>
<struts:checkbox property="os" value="3">Linux</struts:checkbox>
private int[] os;
public int[] getOs() {
return os;}
public void setOs(int[] os) {
this.os = os;}
Any datatype in the formclass is supported (depends on the value)
(for example String[] also works for this example)
Ralph