0

Grid with checkbox

asked 2011-04-10 21:16:22 +0800

cristianrm gravatar image cristianrm
12

Hello I need to make a grid with checkbox anyone have any examples of how to do this? would like both. zul as java, I appreciate the help already provided.
Thanks.

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-04-11 08:05:27 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

updated 2011-04-11 08:05:58 +0800

Sorry, maybe I didn't got your question properly, but here are examples for a checkbox in a grid:

ZUL-Version:

<zk>
 <grid>		
  <rows>
   <row>
    Checkbox: <checkbox />
   </row>
  </rows>
 </grid>
</zk>

Java-Version:

<window id="container">
<zscript>
  Row row = new Row();
  row.appendChild(new Label("Checkbox"));
  row.appendChild(new Checkbox());

  Rows rows = new Rows();
  rows.appendChild(row);

  Grid grid = new Grid();
  grid.appendChild(rows);
 
  container.appendChild(grid);
</zscript>
</window>

HTH, Maik

link publish delete flag offensive edit

answered 2011-04-11 09:30:56 +0800

cristianrm gravatar image cristianrm
12

updated 2011-04-11 10:26:48 +0800

Bold Texthttp://www.zkoss.org/zkdemo/grid/paging


I am following this example, I have a method that would populate the list, the problem that has no error but returns nothing. I think the problem is the completion of each,
someone can tell me what I'm doing right?



public List<Biblioteca> listaBibliotecaCop() {

		List<Biblioteca> lBibliotecas = new ArrayList<Biblioteca>();

		try {
			lBibliotecas = DAOFactory.getDAOFactory().getBibliotecaDAO().pesquisaBibliotecaCopia(instituicao.getCodigo());

		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			logger.error(e.getMessage(), e);
		} catch (ConexaoRecusadaException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			logger.error(e.getMessage(), e);
		}

		return lBibliotecas;

	}


 <row forEach="${listaBibliotecaCop}">
            <label value="${each}" />
            <timebox cols="12" format="a hh:mm:ss" onCreate="self.value = new Date()" mold="rounded" />
            <checkbox label="No" onCheck='self.label= self.isChecked()?"Yes" : "No" ' />
        </row>





     

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

Follow

RSS

Stats

Asked: 2011-04-10 21:16:22 +0800

Seen: 367 times

Last updated: Apr 11 '11

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