Java Reference
In-Depth Information
In our example, we are going to have NetBeans generate the initial template and then
we'll modify the CSS a bit so that the resulting page will have a dark background
with light colored fonts. This will be our "dark" theme.
We'll create a second theme selecting the same layout style as our "dark" theme. We'll
leave the CSS as is for the second one (screenshots not shown).
After we create our resource library contracts, NetBeans creates the corresponding
files under a contracts directory.
Once we have our resource library contracts in place, we need to create a template
client as usual (see previous section) to use our contracts in our application's pages.
Copy the following code in the resourcelibrarycontractsdemo.xhtml file:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<body>
<f:view contracts="normal">
<ui:composition template="/template.xhtml">
<ui:define name="content">
<p>
 
Search WWH ::




Custom Search