this:
We share our model to move towards the view.
Here our model: Student =
It declares three attributes to a single manufacturer and receive our 3 attributes.
It then creates an interface that inherits from BeanModelMarker
Do not forget the @ BEAN ({} package.} {Class. Class), it is very important in the link between the Student class and this interface. Now we move
side view
where we want our grid view, we created a list of Student, called Students:
We then created a store for each Student Students from our list, it generates the BeanModel partner. Thus, we have a store containing BeanModel:
It then creates a XTemplate (kesako? Is what will be displayed when you click on the little extra in our grid, we can not do if you want just a standard grid):
Now, create the columns. It where it created a list of Magique.On ColumnConfig, we add our plugin expander that allows us to post additional information as the previous XTemplate then created as many new ColumnConfig you want column.
colum.setHeader ("Name");
colum.setId ("firstName");
Now it's almost finished, create the famous Grid passing it to our list (Student) and our BeanModel ColumnModel cm.
Well, it's over and normally, I just test it, it works niquel!
Enjoy;)
0 comments:
Post a Comment