com.mycompany.jsf.pl
Class XMLViewHandler.ViewSpecHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.mycompany.jsf.pl.XMLViewHandler.ViewSpecHandler
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- Enclosing class:
- XMLViewHandler
- private static class XMLViewHandler.ViewSpecHandler
- extends org.xml.sax.helpers.DefaultHandler
This class is a SAX DefaultHandler for processing the
view specification file.
Field Summary |
private javax.faces.application.Application |
application
|
private java.util.Stack |
stack
|
Constructor Summary |
XMLViewHandler.ViewSpecHandler(javax.faces.application.Application application,
javax.faces.component.UIComponent root)
Creates an instance and pushes the root component onto a stack. |
Method Summary |
private javax.faces.component.UIComponent |
createComponent(javax.faces.application.Application application,
org.xml.sax.Attributes attrs)
Creates and returns a component of the type specified by
the "type" attribute, configured based on all the other
attributes. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName)
Pops the top component off the stach. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
If the element is a "component" element, calls createComponent()
to create the corresponding component, adds it as a child of
the component at the top of the stack, and pushes the new
component onto the stack. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stack
private java.util.Stack stack
application
private javax.faces.application.Application application
XMLViewHandler.ViewSpecHandler
public XMLViewHandler.ViewSpecHandler(javax.faces.application.Application application,
javax.faces.component.UIComponent root)
- Creates an instance and pushes the root component onto a stack.
startElement
public void startElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
- If the element is a "component" element, calls createComponent()
to create the corresponding component, adds it as a child of
the component at the top of the stack, and pushes the new
component onto the stack.
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Pops the top component off the stach.
- Throws:
org.xml.sax.SAXException
createComponent
private javax.faces.component.UIComponent createComponent(javax.faces.application.Application application,
org.xml.sax.Attributes attrs)
- Creates and returns a component of the type specified by
the "type" attribute, configured based on all the other
attributes.