Reputation:
Is there any tool or plugin available to convert HTML code to JSF tags?
Upvotes: 2
Views: 5293
Reputation: 2062
Maybe you could try this tools: http://docs.oracle.com/cd/E13226_01/workshop/docs92/studio33/JSF/ConvertingHTMLtoJSF.html
Upvotes: 0
Reputation: 81647
If you are using Facelets, you can add for any HTML tag the jsfc attribute that will indicate which JSF component is related to the HTML tag. For example:
<input id="bar" type="text" jsfc="h:inputText" value="#{foo.bar}"/>
I am not sure that automatically generate JSF code from HTML code is a good idea. JSF uses JSP or XHTML pages as a XML description of a page structure. The HTML code is automatically generated by the JSF framework. If you generate the JSF code from the HTML code, you will have a lot of garbage code in your JSP/XHTML files, and I am not sure that the generated code will work correctly.
It is quite dependent of the quality of the HTML you have in fact...
However, you may have a look at the phoenix solution and then clean the generated JSF code.
Upvotes: 1