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

Andrus Adamchik closed CAY-2918.
--------------------------------
    Resolution: Fixed

> Remove OGNL Binding Architecture from CayenneModeler
> ----------------------------------------------------
>
>                 Key: CAY-2918
>                 URL: https://issues.apache.org/jira/browse/CAY-2918
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 5.0-M2
>
>
> This is a background maintenance task to unify CayenneModeler internal 
> architecture. The modeler has a home-grown MVC binding system 
> (org/apache/cayenne/swing/) that uses OGNL to wire Swing components to 
> controller properties and action methods via string expressions like 
> "nodeName" or "closeDialogAction()". It is not used consistently and we are 
> not going to invest any more time in its maintenance. 
> The majority of the components are using plain Swing listeners (anonymous 
> classes / lambdas). So let's remove the bindings stuff and the dependency on 
> OGNL and move to the vanilla Swing approach, which is in fact can even be 
> more compact:
> {noformat}
> -        BindingBuilder builder = new BindingBuilder(
> -                getApplication().getBindingFactory(),
> -                this);
> -        builder.bindToAction(view.getCloseButton(), "closeDialogAction()");
> +        view.getCloseButton().addActionListener(e -> closeDialogAction());
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to