2

I want to add the popup to an existing functionality of backoffice. When a user click on the icon a popup will be populated with a text box and submit button.

I have tried many things but still can't find any proper solution. Help me in that to resolve the issue.

Upasana
  • 45
  • 9

1 Answers1

1

Create a new class that extends org.zkoss.zul.Window Class :

public class CustomWindow extends Window {

}

Then create a render method and add your components :

public class CustomWindow extends Window {
    
    
        public void render(WidgetInstanceManager wim) {
            initComponent(wim);
            final Vlayout container = new Vlayout();
            final Labeltext =new Label("text");
            final Button button = new Button("button");
            container.appendChild(button);
            container.appendChild(text);
            this.appendChild(container);
            setClosable(true);
    
        }
    }

Then you can open your custom window with :

CustomWindow customWindow = new CustomWindow ();
customWindow.render(getWidgetInstanceManager());
customWindow.setParent("add parent component here");
customWindow.doModal();

Adapt the code to correspond more to your needs.

Hope this helps.

Benkerroum Mohamed
  • 1,867
  • 3
  • 13
  • 19