Reputation: 7067
I am new bie to JSF 2.0.
I am using the apache Myfaces implementation of JSF 2.0.
Also I want to use Prime faces for better UI components.
But the problem I am facing is:
The tags for both the Prime faces and Myfaces
are same.
How do I resolves the prefixes.
For example: h: and f:
Upvotes: 2
Views: 2945
Reputation: 1109432
PrimeFaces does not have any tags in the http://java.sun.com/jsf/*
namespace. It has only tags in the http://primefaces.org/*
namespace. Tags in the http://java.sun.com/jsf/*
namespace are part of the concrete JSF implementation which is in your case MyFaces. PrimeFaces is just a component library, not a JSF implementation. You are supposed to run PrimeFaces on top of a concrete JSF implementation.
So, once having both MyFaces and PrimeFaces in the webapp's runtime classpath, this should do:
<!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
>
<h:head>
<title>Title</title>
</h:head>
<h:body>
<h1>PrimeFaces editor demo</h1>
<p:editor />
</h:body>
</html>
Upvotes: 8
Reputation: 21
Include primefaces by using the following xmlns:p="http://primefaces.org/ui"
Upvotes: 2