使用 Tapestry 5 加载 jQuery
好吧,我不是 Java 专家,但我使用过很多 Java 语言。我们通常使用 Tapestry 5 加载 Prototype,因为 Tapestry 是基于此 javascript 库构建的。
作为一名 UI/前端开发人员/工程师,我知道 jQuery 的强大之处以及其中缺乏原型。 (请随意在其他地方争论 - 这张票不涉及这个问题,哈。)
我一直很好奇是否可以将 jQuery 移植到 Tapestry 而不是 Prototype - 就像完全删除 Prototype 和 Scriptaculous - - 我意识到这有点违背了已经捆绑的原型的目的,但我想对此事有其他意见。
谢谢。
更新:
Tapestry 的发明者来访我们@工作,他讨论了在 Tapestry 的未来版本中对库类型的不可知断开的明确需求。假设,这意味着可以将 jQuery 或 Prototype 与 Tapestry 或其他库捆绑在一起。
为了胜利!
Okay, so I'm not a Java guy, but I work with loads of them. We generally load Prototype with Tapestry 5, as Tapestry was built on this javascript library.
As a UI/front end developer/engineer, I know the awesomeness of jQuery and the lack of prototype therein. (Feel free to debate that elsewhere -- this ticket doesn't concern that question, ha.)
I've been curious for some time if it's possible to port jQuery into Tapestry instead of Prototype -- as in completely removing Prototype and Scriptaculous -- I realize it kind of defeats the purpose of the already bundled Prototype, but I wanted other opinions on the matter.
Thanks.
UPDATE:
We had the inventor of Tapestry visit us @ work and he discussed the explicit need for an agnostic disconnect of type of library in future versions of Tapestry. This means, hypothetically, one could bundle jQuery or Prototype with Tapestry, or possibly some other library.
For the win!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
github 上有一个 tapestry-jquery 项目。
我还没有尝试过,但它看起来很有希望,并且应该完全符合您的要求。
There's a tapestry-jquery project on github.
I haven't tried it yet but it looks promising and is supposed to do exactly what you're asking for.
是的,相当。
将其集成到核心中存在一个未解决的问题:https://issues.apache。 org/jira/browse/TAP5-486。
问题是要遵守 T5 的向后兼容性部分。对于您的单个项目,您无需担心这一点。
为此,您的 Java 人员需要创建一个 IoC 服务,该服务获取 Prototype 渲染并用 jQuery 替换它。我面前没有代码,所以所有人都需要进行一些研究。
简短的回答是,是的,有可能,只是需要一些时间投入。
Yes, quite.
There is an open issue in integrate this into the core: https://issues.apache.org/jira/browse/TAP5-486.
The problem is to adhere to the back compatibility pieces of T5. You would not need to worry about that for your single project.
To do so, one of your Java peoples will need to create an IoC Service which grabs the Prototype rendering and replaces it with jQuery. I do not have the code in front of me, so some research will need to be had by all.
Short answer, yes, it is possible just needs some time investment.