jQWidgets Forums
jQuery UI Widgets › Forums › Plugins › Data Adapter › 3.5 broken
This topic contains 7 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 9 months ago.
-
Author3.5 broken Posts
-
Hi Peter,
the folling example http://jsfiddle.net/carlorastelli/bbkbwqx6/ is working in 3.4 but not in the new 3.5. Clicking the update button does not update the data table. This does work in 3.4 .
Best Regards
CarloHi Carlo,
The only broken thing in this code is that the dataFields array is not initialized while it is supposed to be initialized.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
an why does it work in 3.4 ? You must have changed something.
Best Regards
CarloHi Carlo,
Sorry, but as I wrote, dataFields are expected to be defined when you bind something through jqxDataAdapter and especially when you want to rebind something. In your code they are not. This should not have worked in previous versions as well, but it seems that now we are stricter about incorrect usage. When you do not define datafields, jqxDataAdapter tries to auto-generate them. This was valid for all data types except Array. Now it works fine for array, too. This means that you have 2 possible solutions – define the datafields array as it should be, or clear the datafields array when you rebind – http://jsfiddle.net/jqwidgets/p9uqjb9h/
However, if you still do not want to use the plugin in the way it should be used, then you may consider using the previous version, if you feel better with it.Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
thank you for your explanations. This new behaviour did result in no more functional code in our product. We had to spend some hours to find out what was happening as the new behaviuor is not documented. Switching back to older versions is no option for us, because we are using your new great widgets. You should do some regression testing to make shure, that new version do not break old code. We will try your workarround.
Best Regards,
CarloHi Carlo,
I do not think that there is a problem from our side, because If you used it correctly and as it is documented and showcased with demos, you wouldn’t have issues. You have an issue, because you did not define the dataAdapter’s datafields array.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
I agree we did not define the datafield array. But how can one know which fields are optional and which fields mandatory ? The docs do not tell, and at runtime there is no error message. Till 3.4 it even did work so we had no glue that our code could have problems in 3.5 .
Best Regards,
CarloHi Carlo,
The docs and examples clearly show that this is mandatory setting, but am not going to argue with you here. datafields should be always set.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.