June 2014
Intermediate to advanced
578 pages
12h 2m
English
Starting with JSF 2.2, we can programmatically reproduce the content and tasks of faces-config.xml. The starting point consists of a callback method, named populateApplicationConfiguration, which gets a single argument of type org.w3c.dom.Document—this class belongs to DOM API. Basically, a Document (tree node) is a representation in memory of an XML document, and we can manipulate it by adding, removing, importing, or adopting nodes, elements, and text. For each of these operations, there are dedicated methods. For some JSF developers, this API can be something new that should be learned; therefore, this can be a drawback of programmatic configuration.
For now, let's resume the dissertation from the callback ...
Read now
Unlock full access