0

How to Refresh parent page ?

asked 2010-05-10 15:45:45 +0800

vinhvo gravatar image vinhvo
369 3

Hi, I have a page with a grid of data. Then I click a button to open a pop-up window to edit one row's data. Then after I close the pop-up window how can I reload the parent page so that the edited value will show up ?
Thank you.

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2010-05-10 20:12:52 +0800

samchuang gravatar image samchuang
4084 4

Hi

pick a event to do the update to the grid, for example, when finish editing, click a button to confirm input data, and update to the grid.

link publish delete flag offensive edit

answered 2010-05-11 02:37:28 +0800

vinhvo gravatar image vinhvo
369 3

Yes, I have a save button in the popup window , but how can I fire and catch an event from the popup window to its main window.
Thank you for your help

link publish delete flag offensive edit

answered 2010-05-11 19:41:07 +0800

samchuang gravatar image samchuang
4084 4

Hi

there are many way to change the grid's data, for example, you could use ListModel, just access the model and change it;

or you could use Event Quene to do this, you could refer to Chat with Event Queue

link publish delete flag offensive edit

answered 2010-05-12 13:56:53 +0800

vinhvo gravatar image vinhvo
369 3

This is what I was looking for. Thank you for your help.
http://www.zkoss.org/forum/listComment/12107

link publish delete flag offensive edit

answered 2013-06-06 12:58:52 +0800

Praveengk gravatar image Praveengk
0

*public void onClick$PopButoonid(Event e){ try {

    final Window window = (Window)Executions.createComponents(
                "page source path", null, null);
        window.doModal();
       ** Button okBtn = (Button) window.getFellow("ButtonID");
        System.out.println("okbtn==" + okBtn);
        okBtn.addEventListener("onClick", new org.zkoss.zk.ui.event.EventListener() {
            public void onEvent(Event event) throws Exception {
                ***here u have to write logic to reload the particular grid/list            
            }


        });
    } catch(Exception ex){
        ex.printStackTrace(); 
    }

}

  • PopButoonid is nothing but id name of button where popup event is invoked. ** ButtonID is a id of closing a pop up button
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: 2010-05-10 15:45:45 +0800

Seen: 978 times

Last updated: Jun 06 '13

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