# Spreadsheet and java beans binding

ludopaquet
37 1

Hi,

Is it possible with spreadsheet EE to set value to a java bean (not only getting the value) ?

Is it possible to to display a collection of java bean (for each row for example ?)

Many thanks,

Ludovic

delete retag edit

## 8 Replies

dennis
3669 1 6
http://www.javaworld.com....

ashishd
1972 6

Hi ludopaquet,
At the moment it is only one way i.e. from Spring bean to ZK Spreadsheet cell. It is sort of a natural limitation since when you enter a value in cell the back-end cell model value(which btw is the java bean binding expression) will be overwritten by the value just entered hence loosing any connection/reference to java bean and its property. Theoretically it is still possible by using some trick like adding a textbox in front of actual cell and only passing this value thereby not destrying the javabean expression in the cell model. Feel free to post this feature request to ZK Spreadsheet tracker here and it might get added in near future.

ludopaquet
37 1

Thanks ashishd,

Any idea about displaying a list of objects into rows ?

Thanks,

Ludovic

ashishd
1972 6

Hi ludopaquet,
It is hard to imagine the spec for this. Would you mind explaining little bit more about how you imagine the java bean binding expressions would be and the desired spec?

ludopaquet
37 1

Hi, Imagine the java bean ljbean is a List<Object>. Inside a cell you write for(obj in ljbean){obj.param} . As a result the column will be filled with all param properties of all objects in the list.

ashishd
1972 6

Hi ludopaquet,
Seems like a resonable feature to be had for ZK Spreadsheet. Would you mind posting it to ZK Spreadsheet tracker here

sydd
63 1

Bump - sorry to bring up old topic but this seems to be the best location for it.

Has any of this been changed in the latest version of zss?

I am interested in:
1) Two way binding. Binding from the database to the cell, and binding from the cell to the database. If I make a change in the cell, I would like the POJO to be updated.
2) If the bean is a List<Object>, can I populate the column with all the objects in the list?

xizhenyin86
1

Hi eveyBody:

Binding from the cell to the database ,Is there any some code about .I am interested in it.

[hide preview]