开发者

How to compile facelets?

Many times I had errors like:

-tag is not closed(xml error)

-xhtml has duplicated id

Id like to write validat开发者_如何转开发or to check is those errors exist in files. I bet there is some facelets compiler that compile xhtml into java classes and than validates it.


Eclipse WTP, although not being the best thing out there, has some validation for .xhtml / .jsp files. You can try the corresponding editor in NetBeans or IntelliJ.

If checking the validity by opening the page takes you too much time (due to slow redeployment), consider sending the page to the servlet container on save - either using WTP dynamic project, deployed on a server, or via the FileSync plugin.


Have you considered using a good XML editor? It will catch the bad XML.

I also believe that schema aware XML editors will catch that id's must be unique.


You can't "compile" them, but if working with Seam on JBoss, just by saving the xhtml file the changes will be transfered to the running instance, so you can check "on the fly".

Also, on the duplicate id issue, if you don't add the id field, it will be autogenerated, avoiding this problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜