重新加载 Tapestry 布局和其他正在开发的组件?

发布于 2024-09-25 17:14:28 字数 218 浏览 1 评论 0原文

如何对 tml 文件进行更改 - 例如布局和其他组件 - 通过浏览器中的 F5 快速可见? 目前,我将这些文件保存在 java 旁边的 src/main/-folder 下班级。我已经尝试“重新打包”该文件,但 Tapestry 没有拾取它 - 它仅适用于 /webapps 下的 tmls。

PS:将 IntelliJ 与 Maven 结合使用

干杯!

How can I make changes to tml files - like for layout and other components - quickly visible via F5 in the browser? At the moment I keep those files under the src/main/-folder next to the java class. I already tried to 'repackage' the file but it isn't picked up by Tapestry - it only works for tmls under /webapps.

PS: Using IntelliJ with Maven

Cheers!

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

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

发布评论

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

评论(2

仙女 2024-10-02 17:14:28

嘿尤里卡!我在IntelliJ论坛深处找到了答案:

尝试将 .tml 模式添加到设置/
编译器/资源模式,类似
那里已经提供了模式。

当 tml 文件之前不在 webapp/ 下时,IntelliJ 实际上并没有“重新打包”它们(尽管它确实“说了”它 - 这只是意味着!)。

Heureka! I found an answer deep in the IntelliJ forum:

Try to add .tml pattern to Settings /
Compiler / Resource patterns, similar
to patterns already provided there.

IntelliJ didn't actually 'repackage' the tml files when they weren't under webapp/ before (although it did 'say' it - that's just mean!).

与风相奔跑 2024-10-02 17:14:28

发现 使用键盘快捷键 Ctrl + F9(或从 Build->Make Project 菜单选项手动)重建项目,并且然后在浏览器中重新加载页面将导致更改传播。

注意:我的 *.tml 文件位于 src/main/resources/company-name/componentssrc/main/resources/company-name/ page 文件夹,如果您使用 mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org 命令创建项目,则这是默认位置。

IntelliJ Idea 旗舰版 11.1.1

I found that rebuilding the project by using the keyboard shortcut Ctrl + F9 (or manually from the Build->Make Project menu option) and then reload the page in the browser will cause the changes to propagate.

Note: My *.tml files are located in the src/main/resources/company-name/components and src/main/resources/company-name/pages folders, which is the default location if you create your project using the mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org command.

IntelliJ Idea Ultimate 11.1.1

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