|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.mycompany.jsf.pl.XMLViewHandler.TemplateHandler
This class is a SAX DefaultHandler for processing the template file.
Field Summary | |
private javax.faces.context.FacesContext |
context
|
private javax.faces.context.ResponseWriter |
out
|
private javax.faces.component.UIViewRoot |
root
|
private java.util.Stack |
stack
|
private java.lang.Object |
suppressTemplate
|
private java.lang.StringBuffer |
textBuff
|
Constructor Summary | |
XMLViewHandler.TemplateHandler(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot root)
Creates an instance and pushes the root component onto a stack. |
Method Summary | |
void |
characters(char[] buf,
int offset,
int len)
Buffer the characters until an end or start element is encountered. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName)
Writes buffered text, if any. |
private javax.faces.component.UIComponent |
findAndConfigure(java.lang.String id,
org.xml.sax.Attributes attrs)
Returns the component matching the ID, configured based on the attributes. |
private void |
handleTextIfNeeded()
Creates a String containing the buffered characters and another String representing the element structure the characters belong to and lets the subclass handle it. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Writes buffered text, if any, and tries to locate a component with the ID defined by the "id" attribute by calling the findComponent() method on the root component. |
private boolean |
suppressTemplate(javax.faces.component.UIComponent comp)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
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 |
Field Detail |
private java.lang.StringBuffer textBuff
private javax.faces.context.FacesContext context
private javax.faces.context.ResponseWriter out
private javax.faces.component.UIViewRoot root
private java.util.Stack stack
private java.lang.Object suppressTemplate
Constructor Detail |
public XMLViewHandler.TemplateHandler(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot root)
Method Detail |
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
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String lName, java.lang.String qName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
private javax.faces.component.UIComponent findAndConfigure(java.lang.String id, org.xml.sax.Attributes attrs)
private boolean suppressTemplate(javax.faces.component.UIComponent comp)
public void characters(char[] buf, int offset, int len) throws org.xml.sax.SAXException
org.xml.sax.SAXException
private void handleTextIfNeeded()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |