PDA

View Full Version : [beta2] CheckBoxGroup improvements?



winnie
7 May 2008, 2:22 PM
1. It would be nice to have a way to get check boxes associated with a CheckBoxGroup.
Currently, we use setData("checks", List<CheckBox>) to save the association, that is already saved internally.

2. What checkBoxGroup.getValue() is supposed to return? It seems that currently it returns the value of the first check box in the group. This is not too helpful.

darrellmeyer
14 May 2008, 4:08 PM
1. It would be nice to have a way to get check boxes associated with a CheckBoxGroup.
Currently, we use setData("checks", List<CheckBox>) to save the association, that is already saved internally.CheckBoxGroup and RadioGroup now extend the new MultiField. MultiField has a getAll method that returns the child fields.


public class MultiField<F extends Field> extends Field {
}

public class CheckBoxGroup extends MultiField<CheckBox> {
}

public class RadioGroup extends MultiField<Radio> {
}
2. What checkBoxGroup.getValue() is supposed to return? It seems that currently it returns the value of the first check box in the group. This is not too helpful.
/**
* Returns a list of all checked check boxes.
*/
public Object getValue() {
}Changes are in SVN.