how to make component load data after button click event

asked 2009-04-16 04:11:15 +0800

hawk gravatar image hawk
3135 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2009-04-16 04:12:37 +0800

Hi guys,

Here is my ZUML and sample code:
<listbox id="eListbox" model="@{employeeComposer.employees, load-when='add.onClick'}"
<button id="add" label="Add" forward="onAdd"/>
<button id="save" label="Update" forward="onSave"/>
<button id="enable" label="Enable" forward="onEnable"/>
<button id="disable" label="Disable" forward="onDisable"/>
<button id="delete" label="Delete" forward="onDelete"/>
<button id="reset" label="Reset" forward="onReset"/>

public class EmployeeComposer extends GenericAutowireComposer {
public void onAdd(){
public void onSave(){
public void onEnable(){
public void onDisable(){
public void onDelete(){

I want to refresh the page when user click add button.
I use load-when attribute but I found it load data before user click add button, so it won't load the latest data from database.
Currently, I know a solution is to add one line in each event handler method:

is there a solution without writing code? (just modify ZUML)

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-04-17 02:41:14 +0800

PeterKuo gravatar image PeterKuo
481 2

updated 2009-04-17 02:41:46 +0800

Time is the cure.
The lifecyle of load-when and forward event will be rearranged in near future.

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: 2009-04-16 04:11:15 +0800

Seen: 444 times

Last updated: Apr 17 '09

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