Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.1.5
-
None
Description
Maybe I understand LabeledPropertySelectionModel incorrectly,
but in 4.1.3 I could choose the "default" option, and since 4.1.5 I cannot anymore.
The model I use is like this:
public static final IPropertySelectionModel MY_MODEL = new LabeledPropertySelectionModel(
new StringPropertySelectionModel(new String[]
));
The reason is change in revision 592802:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/LabeledPropertySelectionModel.java?r1=515387&r2=592802&diff_format=h
It makes option #0 ALWAYS disabled.
This just isn't fare
I propose to make it configurable:
public class LabeledPropertySelectionModel implements IPropertySelectionModel
{
...
private boolean _disableDefaultLabel;
...
public LabeledPropertySelectionModel(IPropertySelectionModel model, String label, Object option, String value, boolean disableDefaulLabel)
...
public boolean isDisabled(int index)
...