bind live data to grid from resultSet in JSP

asked 2008-06-24 16:31:29 +0800

admin gravatar image admin
18691 1 10 129
ZK Team

Orignial message at:

By: cobetienca

I've already selected data in to a resultSet. Now I need to bind these records into the Grid, but i don't know how. I've walked through lots of small-talk, documentation but all I found is using List for ListBox or Combobox.

I've also try to retrieve data from resultSet, put to a List and bind to grid using EL expression but it's no use. Can anyone give me an example??

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2008-06-25 15:13:34 +0800

admin gravatar image admin
18691 1 10 129
ZK Team

Orignial message at:

By: robertpic71

Here is an example for binding to grid:

<grid id="UserGrid" mold="paging">
<columns sizable="true">
<column label="Profil" width="80px" />
<column label="Description" />
<rows id="personsGridRows">
<row forEach="${allUsers}">
<label value="${each.mprof}" />
<label value="${each.mname}" />

See also http://www.zkoss.org/doc/devguide/ch14s04s02.html
There is an example, binding JDBC to Listbox.

I prefer binding via annoations, check my homepage for examples:

Note: You cannot bind a resultSet as model. You has to convert the resultset to domainclasses or a type of map - or use a OR-Mapper like Hibernate, iBatis...

I've written a JDBCModel (alphastatus, i don't want to post the code at this time).
But feel free to post, if you have questions about JDBC-Binding.


link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2008-06-24 16:31:29 +0800

Seen: 325 times

Last updated: Jun 25 '08

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More