Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property 'bindingAttributes' not found on type org.zkoss.bind.BindComposer with ZK 8.0.0-RC #2

Open
ghost opened this issue May 27, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented May 27, 2015

with this tag in .zhtml (ok with zk 7)

<u:div apply="org.zkoss.angular.AngularComposer"
        binder="@init(value='org.zkoss.angular.AngularBinder')" 
        viewModel="@id('vm') @init('service.HomeService')"
        ng:controller="MyController">

I got this with ZK 8.0.0-RC. Is it something to do with viewModel & apply attributes not working or with org.zkoss.bind.BindComposer being used by default ?

SEVERE: Servlet.service() for servlet dhtmllayoutservlet threw exception
org.zkoss.zel.PropertyNotFoundException: Property 'bindingAttributes' not found on type org.zkoss.bind.BindComposer
    at org.zkoss.zel.BeanELResolver$BeanProperties.get(BeanELResolver.java:429)
    at org.zkoss.zel.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:379)
    at org.zkoss.zel.BeanELResolver.property(BeanELResolver.java:552)
    at org.zkoss.zel.BeanELResolver.getValue(BeanELResolver.java:100)
    at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:66)
    at org.zkoss.zel.CompositeELResolver.getValue(CompositeELResolver.java:66)
    at org.zkoss.xel.zel.XelELResolver.getValue(XelELResolver.java:84)
    at org.zkoss.bind.xel.zel.BindELResolver.getValue(BindELResolver.java:75)
    at org.zkoss.zel.impl.parser.AstValue.getTarget(AstValue.java:117)
    at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:216)
    at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:260)
    at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:51)
    at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:58)
    at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:88)
    at org.zkoss.bind.impl.PropertyBindingHandler.doLoadBinding(PropertyBindingHandler.java:133)
    at org.zkoss.bind.impl.PropertyBindingHandler.doLoad(PropertyBindingHandler.java:334)
    at org.zkoss.bind.impl.BinderImpl.loadComponentProperties0(BinderImpl.java:2307)
    at org.zkoss.bind.impl.BinderImpl.loadComponent0(BinderImpl.java:2276)
    at org.zkoss.bind.impl.BinderImpl.loadComponent(BinderImpl.java:2215)
    at org.zkoss.bind.BindComposer$BinderKeeper$Loader.load(BindComposer.java:510)
    at org.zkoss.bind.BindComposer$BinderKeeper.loadComponentForAllBinders(BindComposer.java:489)
    at org.zkoss.bind.BindComposer.doAfterCompose(BindComposer.java:187)
    at org.zkoss.angular.AngularComposer.doAfterCompose(AngularComposer.java:71)
    at org.zkoss.zk.ui.impl.MultiComposer.doAfterCompose(MultiComposer.java:123)
    at org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:588)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:924)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:870)
@ghost
Copy link
Author

ghost commented May 27, 2015

a temprorary fix is modify class org.zkoss.zk.ui.metainfo.Parser from

if (isMVVM) {
    String apply = compInfo.getApply();
    if (apply != null && apply.indexOf("org.zkoss.bind.BindComposer") != -1) {
        log.warn(message("If the attribute of viewModel is being used, then \"org.zkoss.bind.BindComposer\" will be applied automatically", el));
    } else {
        if (apply == null) apply = "";
            else apply += ",";
            compInfo.setApply(apply + "org.zkoss.bind.BindComposer");
    }
}

to

if (isMVVM) {
    String apply = compInfo.getApply();
    if (apply != null && apply.indexOf("org.zkoss.bind.BindComposer") != -1) {
        log.warn(message("If the attribute of viewModel is being used, then \"org.zkoss.bind.BindComposer\" will be applied automatically", el));
    } else if (apply == null || !apply.contains("org.zkoss.angular.AngularComposer")) {
        if (apply == null) apply = "";
        else apply += ",";
        compInfo.setApply(apply + "org.zkoss.bind.BindComposer");
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants