[
https://issues.apache.org/jira/browse/CAY-2918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrus Adamchik updated CAY-2918:
---------------------------------
Description:
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}
was:
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
> 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
>
> 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)