0

How can display list values in zul page.

asked 2011-11-02 09:47:10 +0800

sivashankar86 gravatar image sivashankar86
24

i hava followingl list.

EmpTimeAttendanceMController dataSource = (EmpTimeAttendanceMController)SpringUtil.getBean("empTimeAttendancemController");
list = dataSource.getElementsByMonthByYear(loginempid,dateFrom,dateTo);
System.out.println(list.size());
List list2=new ArrayList();
for(int i=0;i<list.size();i++) {
list2.add(list.get(i));
System.out.println(list.get(i));
}

here list2 returns dates from 2011-10-01 to 2011-10-31.
how can i display these dates in a zul page

pls help me

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-11-03 06:03:50 +0800

siva477 gravatar image siva477
57

hi,

Use this code, It may be helps you.

<listbox id="box" multiple="true" rows="5" model="@{win$composer.allValues}" >
		 	<listhead>
		 		<listheader label="ID"/>
		 		<listheader label="Name"/>
		 		<listheader label="Salary"/>
		 	</listhead>
		 	<listitem self="@{each='EMPLOYEE'}" value="@{EMPLOYEE}">
		 		<listcell label="@{EMPLOYEE.eid}"/>
		 		<listcell label="@{EMPLOYEE.ename}"/>
		 		<listcell label="@{EMPLOYEE.esal}"/>
		 	</listitem>
		</listbox>


In this by using getAllValues () method you get the values of list.. I am writing code for getting list of Employees.

Here EMPLOYEE is the database table name and .{extensionNames} are the column names.

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-11-02 09:47:10 +0800

Seen: 325 times

Last updated: Nov 03 '11

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