Java Reference
In-Depth Information
When our project is created, NetBeans will add the required libraries to our project,
PrimeFaces tags will autocomplete in our project's JSF pages.
When selecting PrimeFaces as our JSF component suite, NetBeans creates a sample
page using PrimeFaces components when our project is created. The markup for the
file looks like this:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns=""
<title>Facelet Title</title>
<p:commandButton value="Hello from PrimeFaces"
onclick=";" type="button"
<p:dialog header="PrimeFaces Dialog" widgetVar="dlg1"
For more information visit <a href="http://primefaces.
Except for a few PrimeFaces-specific components, the page looks like a regular
Facelets page.
Notice the PrimeFaces namespace, xmlns:p=" " is
automatically added to the <html> tag. This namespace is necessary in order to use
PrimeFaces components in our pages. By convention, PrimeFaces tags use a prefix of p .
The first PrimeFaces component we see in our page is <p:commandButton> , this
component is similar to the standard JSF command button component, but provides
certain advantages over the standard command button, such as rendering nicely
without us having to manually apply CSS stylesheets.
Search WWH ::

Custom Search