-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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
2 | No.2 Revision |
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
3 | code formatting |
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>
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