tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Andreou (JIRA)" <...@tapestry.apache.org>
Subject [jira] Resolved: (TAPESTRY-2310) LabeledPropertySelectionModel.isDisabled always disables its first option
Date Fri, 28 Mar 2008 23:28:24 GMT

     [ https://issues.apache.org/jira/browse/TAPESTRY-2310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Andreou resolved TAPESTRY-2310.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.1.6

> LabeledPropertySelectionModel.isDisabled always disables its first option
> -------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2310
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2310
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 4.1.5
>            Reporter: Albert Tumanov
>            Assignee: Andreas Andreou
>            Priority: Minor
>             Fix For: 4.1.6
>
>
> 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[] { "first", "second", "third"
}));
> 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)
>     {
>         this(model, label, option, value);
>         _disableDefaultLabel = disableDefaulLabel;
>     }
> ...
>     public boolean isDisabled(int index)
>     {
>         return index == 0 ? _disableDefaultLabel : _model.isDisabled(index - 1);
>     }
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message