Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1928

Converter Override (default-binding) causing "Array of attribute values not allowed "

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.5.3
    • Fix Version/s: 6.5.4
    • Component/s: Databind
    • Security Level: Jimmy
    • Labels:

      Description

      defining and using a custom converter for ZKBIND works but fails for "default-bind"

      Array of attribute values not allowed, [self.onChange, self.onChange]
      at org.zkoss.zkplus.databind.DataBinder.loadPropertyAnnotation(DataBinder.java:615)
      at org.zkoss.zkplus.databind.DataBinder.addBinding(DataBinder.java:274)
      at org.zkoss.zkplus.databind.AnnotateDataBinder.loadComponentPropertyAnnotationByAnnotName(AnnotateDataBinder.java:425)
      at org.zkoss.zkplus.databind.AnnotateDataBinder.loadComponentPropertyAnnotation(AnnotateDataBinder.java:413)
      at org.zkoss.zkplus.databind.AnnotateDataBinder.loadAnnotations(AnnotateDataBinder.java:404)
      at org.zkoss.zkplus.databind.AnnotateDataBinder.loadAnnotations(AnnotateDataBinder.java:408)
      at org.zkoss.zkplus.databind.AnnotateDataBinder.init(AnnotateDataBinder.java:374)
      at org.zkoss.zkplus.databind.AnnotateDataBinder.<init>(AnnotateDataBinder.java:330)
      at org.zkoss.zkplus.databind.AnnotateDataBinderInit.doAfterCompose(AnnotateDataBinderInit.java:154)
      at org.zkoss.zk.ui.impl.Initiators$RealInits.doAfterCompose(Initiators.java:125)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:409)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:316)
      at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
      at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)

      the overriding has not taken place, and 2 values are present when the binder tries to evaluate the value, it should only get the overridden value...
      In ZKBIND the BinderImpl calls Annotation ann = AnnotationUtil.getOverrideAnnotation(compCtrl, attr, Binder.ZKBIND);
      first to reduce duplicates, something similar has to be done for default binding in org.zkoss.zkplus.databind.DataBinder

        Attachments

          Activity

            People

            • Assignee:
              jumperchen jumperchen
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: