Revision history [back]

click to hide/show revision 1
initial version

asked 2013-05-09 08:43:51 +0800

jayzk gravatar image jayzk

zk6.x - lang-addon annotation - Array of attribute values not allowed

Hi,

I am upgrading my project from zk5.x to zk6.x. I have extended the zk component and adding my converter to the lang-addon.xml. As per documentation, zk should override the previous one, rather, it seems to be creating an array and throws an error that array is not allowed. This was working fine in zk5.x

As per documentation:

converter. You can specify the class name of the converter that implements the TypeConverter interface. It is used to convert the value between component attribute and bean field. Multiple definition is NOT allowed and the later defined would override the previous defined one.

Here is my lang-addon.xml definition:

<component> <component-name>combobox</component-name> <extends>combobox</extends> <annotation> <annotation-name>default-bind</annotation-name> <property-name>selectedItem</property-name> <attribute> <attribute-name>converter</attribute-name> <attribute-value>com.mycompany.MyComboboxConverter</attribute-value> </attribute> </annotation> </component>

I get the following error: org.zkoss.zk.ui.UiException: Array of attribute values not allowed, [org.zkoss.zkplus.databind.SelectedComboitemConverter, com.mycompany.MyComboboxConverter]

As you can see, I am adding only my converter MyComboboxConverter, the other converter seems to be added by zk.

Please help.

Regards, Jay

zk6.x - lang-addon annotation - Array of attribute values not allowed

Hi,

I am upgrading my project from zk5.x to zk6.x. I have extended the zk component and adding my converter to the lang-addon.xml. As per documentation, zk should override the previous one, rather, it seems to be creating an array and throws an error that array is not allowed. This was working fine in zk5.x

As per documentation:

converter. You can specify the class name of the converter that implements the TypeConverter interface. It is used to convert the value between component attribute and bean field. Multiple definition is NOT allowed and the later defined would override the previous defined one.

Here is my lang-addon.xml definition:

<component> <component-name>combobox</component-name> <extends>combobox</extends> <annotation> <annotation-name>default-bind</annotation-name> <property-name>selectedItem</property-name> <attribute> <attribute-name>converter</attribute-name> <attribute-value>com.mycompany.MyComboboxConverter</attribute-value> </attribute> </attribute> </annotation> </component>

I get the following error: org.zkoss.zk.ui.UiException: Array of attribute values not allowed, [org.zkoss.zkplus.databind.SelectedComboitemConverter, com.mycompany.MyComboboxConverter]

As you can see, I am adding only my converter MyComboboxConverter, the other converter seems to be added by zk.

Please help.

Regards, Jay

zk6.x - lang-addon annotation - Array of attribute values not allowed

Hi,

I am upgrading my project from zk5.x to zk6.x. I have extended the zk component and adding my converter to the lang-addon.xml. As per documentation, zk should override the previous one, rather, it seems to be creating an array and throws an error that array is not allowed. This was working fine in zk5.x

As per documentation:

converter. You can specify the class name of the converter that implements the TypeConverter interface. It is used to convert the value between component attribute and bean field. Multiple definition is NOT allowed and the later defined would override the previous defined one.

Here is my lang-addon.xml definition:

<component>
     <component-name>combobox</component-name>
     <extends>combobox</extends>
     <annotation>
         <annotation-name>default-bind</annotation-name>
         <property-name>selectedItem</property-name>
         <attribute>
             <attribute-name>converter</attribute-name>
             <attribute-value>com.mycompany.MyComboboxConverter</attribute-value>
         </attribute>         </annotation>
    </component>

</component>

I get the following error: org.zkoss.zk.ui.UiException: Array of attribute values not allowed, [org.zkoss.zkplus.databind.SelectedComboitemConverter, com.mycompany.MyComboboxConverter]

As you can see, I am adding only my converter MyComboboxConverter, the other converter seems to be added by zk.

Please help.

Regards, Jay

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More