如何添加具有 hybris 后台现有功能的弹出窗口?

发布于 2025-01-19 08:20:58 字数 96 浏览 3 评论 0原文

我想将弹出窗口添加到后退的现有功能中。当用户单击图标时,将使用文本框填充弹出窗口并提交按钮。

我尝试了很多事情,但仍然找不到任何适当的解决方案。帮助我解决这个问题。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦幻的心爱 2025-01-26 08:20:58

创建一个扩展org.zkoss.zul.zul.window类的新类:

public class CustomWindow extends Window {

}

然后创建Render方法并添加组件:

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);
    
        }
    }

然后您可以使用以下方式打开自定义窗口:

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

调整:代码以相对应与您的需求相对应。

希望这会有所帮助。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文