因为业务功能原因,在edit页面使用PersistenceHelper.isNew()无法判断是新增还是修改,因此只能在点击按钮打开页面的同时setCaption,但是发现无法添加.withCaption,代码如下

请问有什么解决办法吗?
试试看这样:
Screen screen = screenBuilders.editor(YourEntityClass.class, this)
.editEntity(yourEntity).withLaunchMode(OpenMode.DIALOG).build();
screen.getWindow().setCaption("Your caption");
screen.show();
可以实现,感谢!