简体   繁体   English

GWT 2.1编辑器框架

[英]GWT 2.1 Editors framework

I'm looking for some documentation or examples on how to use the GWT 2.1 Editor framework . 我正在寻找有关如何使用GWT 2.1 Editor框架的一些文档或示例。 Google's documentation is uh, somewhat lacking. 谷歌的文档是呃,有点缺乏。

From the limited documentation available, I've been able to glean that editors will (in theory) allow you to more easily bind GUI elements to data models. 从可用的有限文档中,我已经能够理解编辑器(理论上)将允许您更轻松地将GUI元素绑定到数据模型。 This will alleviate the very common task of copying data into a TextArea/ListBox/CheckBox, and then replicating the user's changes back to the underlying model (and ultimately the DB). 这将缓解将数据复制到TextArea / ListBox / CheckBox,然后将用户的更改复制回底层模型(最终是数据库)的常见任务。

If it does indeed deliver on this, it will be very welcome. 如果确实能够实现这一目标,那将非常受欢迎。 For now, I'm left scratching my head as to how to implement any of it. 就目前而言,我还在试着如何实现其中任何一个。 Any pointers to documentation or examples would be highly appreciated. 任何指向文档或示例的指针都将受到高度赞赏。

A little while ago, when I was in the same situation (not only did the snippets from the Google documentation not work, but they also left out the most basic glue code to make them work), I attempted to write the most basic Editors example project for myself. 不久之前,当我处于相同的情况时(不仅Google文档中的片段不起作用,而且他们也遗漏了最基本的胶水代码以使它们工作),我试图编写最基本的编辑器示例我自己的项目。 I learned the editor basics from the DynaTableRf example (which is way too complex to get started with Editors IMO), and put something together. 我从DynaTableRf示例中学习了编辑器基础知识(这对于编辑IMO来说太复杂了),并将一些东西放在一起。

Let me warn you: It's simple, but it's raw and unpolished, it's just a proof of concept. 让我警告你:这很简单,但它是原始的和未经抛光的,它只是一个概念证明。 It's just a zip of my Eclipse project: http://www.mediafire.com/file/nwsohz7ov3cx173/playGwtEditors-02.zip (note: This is the old version for GWT 2.1) 它只是我的Eclipse项目的一个zip: http//www.mediafire.com/file/nwsohz7ov3cx173/playGwtEditors-02.zip (注意:这是GWT 2.1的旧版本)

Update 更新

I just updated the project to use GWT 2.3. 我刚刚更新了项目以使用GWT 2.3。 The old GWT 2.1 bug which I had mentioned in my project is gone now. 我在项目中提到的旧GWT 2.1错误现在已经消失了。 Here's the new version: http://www.mediafire.com/file/u1yffwuxi441dip/playGwtEditors-03.zip 这是新版本: http//www.mediafire.com/file/u1yffwuxi441dip/playGwtEditors-03.zip

I've been in the same place for a while, trying to figure out how Editors hook up with the RequestFactory stuff. 我已经在同一个地方呆了一段时间,试图弄清楚编辑如何与RequestFactory的东西挂钩。 The DynaTableRF sample in the GWT 2.1.1 release is what finally started making things come together - it's complex, but I think you need a complex app to start seeing the benefits. GWT 2.1.1版本中的DynaTableRF示例最终开始使事情变得复杂 - 它很复杂,但我认为您需要一个复杂的应用程序才能开始看到它的好处。 The code in each step is wonderfully simple - but there are a lot of steps! 每个步骤中的代码都非常简单 - 但是有很多步骤!

Here is another example using Editor Framework with Request Factory hope it helps too. 这是使用带有Request Factory的Editor Framework的另一个例子,希望它也有帮助。 https://github.com/mgenov/injecting-request-factory https://github.com/mgenov/injecting-request-factory

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM