JSF HTML5 tag tutorials / guides?

天涯浪子 提交于 2020-01-11 17:03:11

问题


I'm on the hunt for some more reading on JSF's HTML5 tag H5. I saw IBM's JSF 2 fu articles on it , but haven't really seen much else except presentations and slide shows on 'the promises of html5' and such.

Can anyone suggest some recommended technical reading ?


回答1:


I'll bet that you're talking about this article. The h5 taglib just points to composite components which wraps some HTML5 specific elements. Composite components are just Facelet files which can be declared and used as a single JSF component in other pages. Even more, the full source code is posted in public in chapter "A JSF 2 HTML5 canvas component" of the article. You just have to copypaste it into your project to get it to run. It's not some component library like RichFaces/PrimeFaces or whatever which you have to download, install and configure first.

JSF doesn't care if the output is XHTML or HTML5. Both are equally valid as long as you adhere the XML syntax (i.e. the document must always be well-formed). You can perfectly inline HTML5 specific tags in JSF pages/components. Your only concern is the browser support.

If your concrete problem is more the lack in understanding of the purpose of composite components and how they work, then I'd suggest to get yourself through the appropriate sections of the Java EE 6 tutorial.

  • Java EE 6 tutorial - Chapter 5 - Facelets - Composite Components
  • Java EE 6 tutorial - Chapter 13 - Advanced Composite Components

See also:

  • JSF 2.0, is it possible to create my own component?
  • Is it possible to use HTML4/5 with JSF/Facelets?


来源:https://stackoverflow.com/questions/5252821/jsf-html5-tag-tutorials-guides

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!