mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 19:57:36 +08:00
PL-8526 Desktop CustomDecorator is slow
This commit is contained in:
parent
cc64a794af
commit
f3753d1fd8
@ -25,15 +25,14 @@ import java.util.Set;
|
||||
|
||||
public class CustomDecorator implements ComponentDecorator {
|
||||
|
||||
private String className;
|
||||
private Class decoratorClass;
|
||||
|
||||
public CustomDecorator(String className) {
|
||||
this.className = className;
|
||||
this.decoratorClass = AppBeans.get(Scripting.class).loadClassNN(className);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decorate(Object component, Set<String> state) {
|
||||
Class decoratorClass = AppBeans.get(Scripting.class).loadClassNN(className);
|
||||
try {
|
||||
ComponentDecorator delegate = (ComponentDecorator) decoratorClass.newInstance();
|
||||
delegate.decorate(component, state);
|
||||
|
Loading…
Reference in New Issue
Block a user