As a side note, you are assigning the model to the grid using $composer in zul. A more efficient way would be to use @Bind annotation in composer to have access to the grid component in your composer. From there, you can do myGrid.setModel(myModel) in java code directly.
MDuchemin ( 2020-01-10 18:29:45 +0800 )editThis said, if you like the databinding notation, you could read-up on MVVM pattern for ZK. (You are using a composer, which is typically and MVC pattern tool). Both MVC and MVVM have valid use cases. I like MVVM slightly more for the model / view separation, but that's personal tastes.
MDuchemin ( 2020-01-10 18:32:18 +0800 )editThank you for your response. I managed to get the grid working with my database. Now I'm encountering problems with the functionalities of the grid (like sorting, editing in row, etc). I searched a bit and considering your words I'll take a look at the Model thing you mentioned. Thank you so much :D
pablo123 ( 2020-01-11 00:22:51 +0800 )edit