Hi!

Take a look at HostListModel.java, line 721

    public void edit(final boolean isEditWithPMemphasis) {
        if (getWindow() != null) {
            return;
        }

        AsyncDataProvider.getInstance().getDataCenterList(new AsyncQuery<>(dataCenters -> {
            VDS host = getSelectedItem();

            final EditHostModel hostModel = new EditHostModel();
            hostModel.updateModelFromVds(host, dataCenters, isEditWithPMemphasis);
            hostModel.setSelectedCluster(host);
            hostModel.onDataInitialized();
            hostModel.setTitle(ConstantsManager.getInstance().getConstants().editHostTitle());
            hostModel.setHelpTag(HelpTag.edit_host);
            hostModel.setHashName("edit_host"); //$NON-NLS-1$
            hostModel.setIsHeSystem(isHeSystem());
            hostModel.setHostsWithHeDeployed(getHostsWithHeDeployed());
            hostModel.setHostedEngineHostModel(new HostedEngineHostModel());

            setWindow(hostModel);


See how we have EditHostModel? and then we call setWindow(hostModel). That opens the popup.

You'll need to do something similar. Perhaps call it "DeployHostModel". The properties that model will have will depend on what you are trying to accomplish.

This part of the code is complex, and in the future we'd like to simplify it. I hope this gets you started, and feel fee to ask follow-up questions.

Best wishes,
Greg


On Mon, Jul 24, 2017 at 4:58 AM, 劉芳 <fangng9@163.com> wrote:
Hi everyone!

      Recently I am learning GWT and OVirt.  I want to try adding  some new function to engine , First, adding a new sub-function buttons under "hosts", as fallow picture 1.
   
     There is  deployment button, then click it I hope popup a new window similar "Remove Host(s)", as fallow picture 2. 
   

     I meet some questions about click deployment Button, can't popup a new window.  I tried to set breakpoint step 

     debugging use IDE-Intellij and GWT-Development-Mode, with the execution of the code step, the page has't response.
  
     Can you tell me how to implement  processs of binding events,  how to popup a new window. Or how to debug the problem.

The process of binding events implement
  


picture 1:
   
  
picture 2:
 


 


_______________________________________________
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel



--
Greg Sheremeta, MBA
Sr. Software Engineer
Red Hat, Inc.
gshereme@redhat.com