首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RapidClipse X- PopupView

RapidClipse X- PopupView
EN

Stack Overflow用户
提问于 2020-02-11 19:31:50
回答 3查看 107关注 0票数 1

由于仍然没有从RC-4迁移到RC-X的手册,因此创建新项目或迁移旧项目并不容易。有谁知道如何在完成活动或取消后,在popup类中显示用于编辑内容的PopupView并再次将其关闭?

不同的其他概念变化,如网格、item.writebean……我已经解决了。但是对于弹出窗口,找不到类似的解决方案。

提前感谢你的每一个提示。

EN

回答 3

Stack Overflow用户

发布于 2020-02-13 20:31:21

我要做的是创建一个继承自Dialog的新GUI元素。然后可以使用GUI-Builder来设计此视图。要显示该对话框,您只需创建一个新实例,然后对其调用()方法。

对话框示例: EditPopup(myBean).open();<- EditPopup继承自对话框

关闭对话框就像调用this.close();一样简单

希望这能有所帮助:)

票数 0
EN

Stack Overflow用户

发布于 2020-05-04 23:08:45

我有一个删除确认对话框在一个快速的X应用程序中。也许你可以用下面的例子来完成你的请求。对不起,德语对话,没有更深层次的解释:

代码语言:javascript
复制
    private void btnDelete_onClick(final ClickEvent<Button> event)
{
    final HorizontalLayout horlayout=new HorizontalLayout();
    final VerticalLayout vertlayout=new VerticalLayout();
    final Notification myDelRequest=new Notification();//
    final Button btnAbbr=new Button();

    this.logger.info("Der Datensatz mit der ID soll gelöscht werden: " + this.nrDmvId.getValue().toString());

    if(this.nrDmvId.getValue() != null && this.nrDmvId.getValue() > 0)
    {

        btnAbbr.addClickListener(evtclose->
        {
            this.logger.info("Der Datensatz mit der ID wurde nicht gelöscht: " + this.nrDmvId.getValue().toString());
            myDelRequest.close();
        });

        btnAbbr.setText("Abbrechen");
        final Button btnDelConf=new Button();
        btnDelConf.addClickListener(evtDelete -> {

            try {

                if(this.binder.validate().isOk())
                {
                    final boolean confirm = new OkmDbMetadataValueDAO().removeById(this.nrDmvId.getValue().longValue());
                    this.logger.info("Der Datensatz mit der ID ist gelöscht: " + this.nrDmvId.getValue().toString()+ ", Rückgabe= "+ Boolean.toString(confirm));

                    this.btnDelete.setVisible(false);
                    this.btnSave.setVisible(false);
                    this.fiRegalplatz.setVisible(false);
                    this.fiposition.setVisible(false);
                    this.fiKurzBez.setVisible(false);
                    this.fiBeschreibung.setVisible(false);
                    this.frmRegale.setVisible(false);

                }
            }
            catch(final Exception e)
            {
                e.printStackTrace();
            }


            myDelRequest.close();

        });


        btnDelConf.setText("Daten löschen");
        vertlayout.add(new Label("Wollen Sie den Datensatz wirklich löschen?"));
        vertlayout.add(horlayout);
        horlayout.add(btnAbbr);
        horlayout.add(btnDelConf);

        myDelRequest.add(vertlayout);
        myDelRequest.setPosition(Position.MIDDLE);
        myDelRequest.addThemeVariants(NotificationVariant.LUMO_PRIMARY);
        myDelRequest.open();
    }

}
票数 0
EN

Stack Overflow用户

发布于 2020-05-04 23:15:49

下面你会发现第二个例子,我用它来打开一个带有列表框的对话框。在从列表框中选择一个值之后,我在底层表单中传输并使用它:

代码语言:javascript
复制
    private void btEditL1_onClick(final ClickEvent<Button> event)
{
    //modal Dialog Mainclassification
    final HorizontalLayout horlayout=new HorizontalLayout();
    final VerticalLayout vertlayout=new VerticalLayout();
    final Notification MyL1Selection=new Notification();//
    final Button btnAbbruch=new Button();
    final ComboBox<TfinGroup> cBL1Liste = new ComboBox<>();

    btnAbbruch.setText("Abbruch");
    vertlayout.add(new Label("Bitte wählen Sie eine Klasse?"));
    horlayout.add(cBL1Liste);
    horlayout.add(btnAbbruch);
    vertlayout.add(horlayout);

    cBL1Liste.setDataProvider(DataProvider.ofCollection(TfinGroupDAO.INSTANCE.findMainGroups()));
    cBL1Liste.setItemLabelGenerator(ItemLabelGeneratorFactory
        .NonNull(v -> CaptionUtils.resolveCaption(v, "{%id}, {%groupName}")));




    cBL1Liste.addValueChangeListener(evtChangeSelektion ->
    {
        this.logger.info("Es wurde ein Wert aus der Liste selektiert: "+ evtChangeSelektion.getValue().getId());
        // muss zu cB2 übergeben werden und in Textfeld         nrL1Id
        this.nrL1Id.setValue((double)evtChangeSelektion.getValue().getId());
        MyL1Selection.close();

    });

    btnAbbruch.addClickListener(evtclose->
    {
        this.logger.info("Abbrechen geklickt");
        MyL1Selection.close();
    });


    vertlayout.add(horlayout);
    horlayout.add(btnAbbruch);

    MyL1Selection.add(vertlayout);
    MyL1Selection.setPosition(Position.MIDDLE);
    MyL1Selection.addThemeVariants(NotificationVariant.LUMO_PRIMARY);
    MyL1Selection.open();
    this.btnEditL2.setVisible(true);

}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60167885

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档