Tool or plugin for converting HTML to JSF tags

Is there any tool or plugin for converting HTML to JSF tags?

+2


source to share


2 answers


If you are using Facelets , you can add a jsfc attribute to any HTML tag that will indicate which JSF component is associated with the HTML tag. For example:

<input id="bar" type="text" jsfc="h:inputText" value="#{foo.bar}"/>

      

I'm not sure if it's a good idea to automatically generate JSF code from HTML code. JSF uses JSP or XHTML pages as the XML description of the page structure. The HTML code is automatically generated by the JSF framework. If you generate JSF code from HTML code, you will have a lot of garbage code in your JSP / XHTML files, and I'm not sure if the generated code will work correctly.



It depends on the quality of the HTML you actually have ...

However, you can take a look at phoenix's solution and then clean up the generated JSF code.

+1


source


Perhaps you could try these tools: http://docs.oracle.com/cd/E13226_01/workshop/docs92/studio33/JSF/ConvertingHTMLtoJSF.html



0


source







All Articles