Windowbuilder Pro - selectedElement 绑定不起作用

发布于 2024-10-17 00:00:50 字数 364 浏览 0 评论 0原文

按照教程尝试学习 Windowbuilder Pro 并遇到了一些问题。

我有一个对象列表,并且想要创建一个绑定函数,以便当我在列表中选择一个对象时,相应的对象名称将出现在按钮中。

这种类型的操作对我来说从来不起作用。 “selectedElement”列中没有出现特定于对象的选项,仅出现 .

如果我尝试将一个按钮绑定到特定的 beans 属性,它会很好地工作。

Windowbuilder 的文档非常稀疏,我没有想到其他地方可以求助。

非常感谢任何帮助解决问题或深入学习 Windowbuilder 的资源。 在此处输入图像描述

Following a tutorial trying to learn Windowbuilder Pro and running into some problems.

I have a list of an object, and want to create a binding function so that that when I've selected an object in the list, the corresponding objects name will appear in a button.

This type of operation never works for me. No object-specific options appear in the "selectedElement" column, just .

If I try to bind say a button to a specific beans property, it works well.

The documentation for Windowbuilder is so sparse I didn't think of anywhere else to turn.

Greatly appreciate any help with solving the problem or resources for learning Windowbuilder indepth. enter image description here

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

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

发布评论

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

评论(1

谜兔 2024-10-24 00:00:50

我应该指出,有关 Swing 数据绑定的 WindowBuilder 文档明确旨在记录如何使用 WB 工具,而不是如何使用 Swing 数据绑定 API 本身。事实上,WindowBuilder 希望您先很好地掌握 Swing 数据绑定基础知识,然后才能有效地使用它提供的工具。

根据您的问题,听起来您需要创建一个 WB 文档 此处。要了解 an 是什么以及如何使用它,您应该参考 Swing 数据绑定文档本身。

最重要的是,如果您知道如何手动(在源代码中)创建所需的 Swing 数据绑定,那么您应该能够比使用 WindowBuilder 更快地创建。 WB 致力于以尽可能纯粹的形式公开 Swing DB API(有缺陷)。我们有意尝试展示 DB API 的全部功能,而不在其之上添加任何简化层。缺点是,如果您是 Swing DB API 的新手并且不知道它是如何工作的,WB 将不会帮助您或教您如何使用它。

I should point out the WindowBuilder docs on Swing Data Binding are expressly intended to document how to use the WB tools and not how to use the Swing Data Binding API itself. In fact, WindowBuilder expects you to have a fairly good grasp of Swing Data Binding fundamentals before you can effectively use the tools it provides.

Based on your question, it sounds like you need to create an as described in the WB docs here. To understand what an is and how to use it, you should refer to the Swing Data Binding docs themselves.

The bottom line is that, if you know how to create the Swing Data Bindings that you need by hand (in source), you should be able to more rapidly create then using WindowBuilder. WB strives to expose the Swing DB API in as pure a form as possible (warts and all). We have intentionally tried to expose the full power of the DB API without adding any simplification layer on top of it. The downside is that, if you are new to the Swing DB API and don't know how it all is intended to work, WB will not help you or teach you how to use it.

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