如何将 ExtJS FormPanel 与 JSF 2.0 结合使用
我尝试将 ExtJS FormPanel 与 JSF 2.0 + MyFaces 2.0.4 一起使用。 ExtJS 是一个很棒的 JavaScript 框架。但它不使用Page的DOM。所以主要问题从这里开始。为了让 JSF bean 工作,我必须将 h:form 标记放入 XHTML(或处理 viewstate)中,因为它必须与 ViewState 同步。
但 ExtJS 不知道 ViewState。我怎样才能让 ExtJS 知道 ViewState 并同步。我希望将其放入 FormPanel...items:[{.....}]。但找不到任何办法。
还有一件事;一个页面上可能有两个或多个表单。如果我不能将其放入 ExtJS items[{...}] 中,我该如何进行每个表单管理。
谢谢。
Im trying to use ExtJS FormPanel with JSF 2.0 + MyFaces 2.0.4. ExtJS is a great JavaScript framework at all. But it doesnt use DOM of Page. So the main problem starts with here. To put JSF beans in work i must put h:form tag inside the XHTML(or handle viewstate) since it must synchronize with ViewState.
But ExtJS doesnt aware of THE ViewState. How can i make ExtJS aware of THE ViewState and synchronize at all. I wish to put it in FormPanel....items:[{.....}]. But couldnt find any way.
And one more thing; There may be two or more form on a single page. If i cant put it in ExtJS items[{...}] how can i do each forms management.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我非常广泛地使用了这两个框架,我认为您在这里找错了方向。当您弄清楚如何将这些耦合到 JSF 生命周期中时,我认为您可能已经在服务器上编写了 Ext 可以使用的 REST 资源。
或者,如果您坚持使用 JSF,并且正在寻找一些时髦的数据网格,则可以尝试 Primefaces 或许多其他 JSF 组件库之一。它们不如 Extjs 好,但如果您是 JSF 商店,那么值得研究一下。
还有 Ext GWT,当然与 JSF 无关,但我从未使用过它。
I've used both of these frameworks pretty extensively, and I think you're barking up the wrong tree here. By the time you figure out how to couple these into the JSF lifecycle, I think you could have written the REST resources on your server with that Ext could consume.
Or if you are sticking with JSF, you could try Primefaces or one of the many other JSF component libraries if you're looking for some snazzy data grids. They aren't as nice as Extjs, but if you are a JSF shop it is worth looking into.
There's also Ext GWT, which has nothing to do with JSF of course, but I've never used that.