Java Doc for DocFragmentJspWriter.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » insync » faces » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.insync.faces 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.netbeans.modules.visualweb.insync.faces.DocFragmentJspWriter

DocFragmentJspWriter
class DocFragmentJspWriter extends ResponseWriter (Code)
DocFragmentJspWriter provides a direct-to-DOM JSP writer for improved design-time DOM handling
author:
   Carl Quinn
author:
   Tor Norbye
version:
   1.1


Field Summary
 Stringencoding
    

Constructor Summary
public  DocFragmentJspWriter(FacesContainer container, DocumentFragment frag)
    

Method Summary
public  NodeappendTextNode(String text)
    
public  ResponseWritercloneWithWriter(Writer writer)
     Creates a new instance of this ResponseWriter, using a different Writer.
public  voidclose()
     Close the stream, flushing it first.
public  voidendDocument()
    

Write whatever text should end a response.

public  voidendElement(String name)
    

Write the end of an element, after closing any open element created by a call to startElement().

public  voidflush()
     Flush the stream.
public  StringgetCharacterEncoding()
     the character encoding, such as "ISO-8859-1" for thisResponseWriter.
public  StringgetContentType()
    
public  NodegetCurrent()
    
public  intgetDepth()
     Return the depth of the current target node being rendered by the jsp writer.
public  DocumentFragmentgetFragment()
    
public  NodeimportNode(Node node, boolean deep)
     Import a node into the written dom tree.
public  voidpopNode()
    
public  voidsetCurrent(Node current, int depth)
     Ensure that we're done with the given node.
public  voidsetPreRendered(UIComponent bean, DocumentFragment df)
     Set the "pre rendered" DocumentFragment for a particular bean. Note: Only ONE bean can be pre-rendered at a time; this is not a per-bean assignment.
public  voidstartDocument()
    
public  voidstartElement(String name, UIComponent componentForElement)
    

Write the start of an element, up to and including the element name.

public  voidwrite(char cbuf)
    
public  voidwrite(char[] cbuf, int off, int len)
    
public  voidwrite(int c)
    
public  voidwrite(String str)
    
public  voidwrite(String str, int off, int len)
    
public  voidwriteAttribute(String name, Object value, String componentPropertyName)
    

Write an attribute name and corresponding value (after converting that text to a String if necessary), after escaping it properly. This method may only be called after a call to startElement(), and before the opened element has been closed.


Parameters:
  name - Attribute name to be added
Parameters:
  value - Attribute value to be added
Parameters:
  componentPropertyName - May be null.
public  voidwriteComment(Object comment)
    

Write a comment containing the specified text, after converting that text to a String if necessary.

public  voidwriteText(Object text, String componentPropertyName)
    

Write an object (after converting it to a String, if necessary), after escaping it properly.

public  voidwriteText(char text)
    

Write a single character, after escaping it properly.

public  voidwriteText(char[] text, int off, int len)
    

Write text from a character array, after escaping it properly for this method.

public  voidwriteURIAttribute(String name, Object value, String componentPropertyName)
    

Write a URI attribute name and corresponding value (after converting that text to a String if necessary), after encoding it properly (for example, '%' encoded for HTML). This method may only be called after a call to startElement(), and before the opened element has been closed.


Parameters:
  name - Attribute name to be added
Parameters:
  value - Attribute value to be added
Parameters:
  componentPropertyName - May be null.

Field Detail
encoding
String encoding(Code)




Constructor Detail
DocFragmentJspWriter
public DocFragmentJspWriter(FacesContainer container, DocumentFragment frag)(Code)
Construct the DocFragmentJspWriter




Method Detail
appendTextNode
public Node appendTextNode(String text)(Code)



cloneWithWriter
public ResponseWriter cloneWithWriter(Writer writer)(Code)
Creates a new instance of this ResponseWriter, using a different Writer.



close
public void close() throws IOException(Code)
Close the stream, flushing it first. Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously-closed stream, however, has no effect.
exception:
  java.io.IOException - If an I/O error occurs



endDocument
public void endDocument() throws IOException(Code)

Write whatever text should end a response. If there is an open element that has been created by a call to startElement(), that element will be closed first.


exception:
  java.io.IOException - if an input/output error occurs



endElement
public void endElement(String name) throws IOException(Code)

Write the end of an element, after closing any open element created by a call to startElement().
Parameters:
  name - Name of the element to be ended
exception:
  java.io.IOException - if an input/output error occurs
exception:
  java.lang.NullPointerException - if nameis null




flush
public void flush() throws IOException(Code)
Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.
exception:
  java.io.IOException - If an I/O error occurs



getCharacterEncoding
public String getCharacterEncoding()(Code)
the character encoding, such as "ISO-8859-1" for thisResponseWriter. Please see theIANA for a list of character encodings.



getContentType
public String getContentType()(Code)
the content type, such as "text/html" for thisResponseWriter.



getCurrent
public Node getCurrent()(Code)
Return the current target node being rendered to by the jsp writer



getDepth
public int getDepth()(Code)
Return the depth of the current target node being rendered by the jsp writer. The document fragment starts out at depth 0.



getFragment
public DocumentFragment getFragment()(Code)
Return the DocumentFragment being constructed by the writer



importNode
public Node importNode(Node node, boolean deep)(Code)
Import a node into the written dom tree. If deep is true just clone it in and continue at the same level. If close is false, then import one node & descend.
Parameters:
  node - Node to be copied
Parameters:
  deep - If true, copy recursively, e.g. include all children of node as well The imported node



popNode
public void popNode()(Code)
Pop up a level after doing a non-deep import



setCurrent
public void setCurrent(Node current, int depth)(Code)
Ensure that we're done with the given node. Called to "rollback" in case a child has aborted during render.



setPreRendered
public void setPreRendered(UIComponent bean, DocumentFragment df)(Code)
Set the "pre rendered" DocumentFragment for a particular bean. Note: Only ONE bean can be pre-rendered at a time; this is not a per-bean assignment. When set, this will cause the given DocumentFragment to be inserted into the output fragment rather than calling the bean's renderer. This is intended to be used for for example having the ability to "inline edit" a particular component's value; in that case since we're not updating the value attribute during editing, we want to suppress the normal rendered portion from the component and instead substitute the inline-edited document fragment corresponding to the parsed text output of the component.



startDocument
public void startDocument() throws IOException(Code)

Write whatever text should begin a response.


exception:
  java.io.IOException - if an input/output error occurs



startElement
public void startElement(String name, UIComponent componentForElement) throws IOException(Code)

Write the start of an element, up to and including the element name. Once this method has been called, clients can call writeAttribute() or writeURIAttribute() method to add attributes and corresponding values. The starting element will be closed (that is, the trailing '>' character added) on any subsequent call to startElement(), writeComment(), writeText(), endElement(), or endDocument().


Parameters:
  name - Name of the element to be started
Parameters:
  componentForElement - May be null. Ifnon-null, must be the UIComponent instance to whichthis element corresponds.
exception:
  IOException - if an input/output error occurs
exception:
  NullPointerException - if nameis null



write
public void write(char cbuf) throws IOException(Code)



write
public void write(char[] cbuf, int off, int len) throws IOException(Code)



write
public void write(int c) throws IOException(Code)



write
public void write(String str) throws IOException(Code)



write
public void write(String str, int off, int len) throws IOException(Code)



writeAttribute
public void writeAttribute(String name, Object value, String componentPropertyName) throws IOException(Code)

Write an attribute name and corresponding value (after converting that text to a String if necessary), after escaping it properly. This method may only be called after a call to startElement(), and before the opened element has been closed.


Parameters:
  name - Attribute name to be added
Parameters:
  value - Attribute value to be added
Parameters:
  componentPropertyName - May be null. Ifnon-null, this must be the name of the property onthe UIComponent passed in to a previous call to DocFragmentJspWriter.startElement to which this attribute corresponds.
exception:
  IllegalStateException - if this method is called when thereis no currently open element
exception:
  IOException - if an input/output error occurs
exception:
  NullPointerException - if name isnull



writeComment
public void writeComment(Object comment) throws IOException(Code)

Write a comment containing the specified text, after converting that text to a String if necessary. If there is an open element that has been created by a call to startElement(), that element will be closed first.


Parameters:
  comment - Text content of the comment
exception:
  java.io.IOException - if an input/output error occurs
exception:
  java.lang.NullPointerException - if commentis null



writeText
public void writeText(Object text, String componentPropertyName) throws IOException(Code)

Write an object (after converting it to a String, if necessary), after escaping it properly. If there is an open element that has been created by a call to startElement(), that element will be closed first.

All angle bracket occurrences in the argument must be escaped using the > < syntax.


Parameters:
  text - Text to be written
Parameters:
  componentPropertyName - May be null. Ifnon-null, this is the name of the property in theassociated component to which this piece of text applies.
exception:
  IOException - if an input/output error occurs
exception:
  NullPointerException - if textis null



writeText
public void writeText(char text) throws IOException(Code)

Write a single character, after escaping it properly. If there is an open element that has been created by a call to startElement(), that element will be closed first.


Parameters:
  text - Text to be written
exception:
  java.io.IOException - if an input/output error occurs



writeText
public void writeText(char[] text, int off, int len) throws IOException(Code)

Write text from a character array, after escaping it properly for this method. If there is an open element that has been created by a call to startElement(), that element will be closed first.


Parameters:
  text - Text to be written
Parameters:
  off - Starting offset (zero-relative)
Parameters:
  len - Number of characters to be written
exception:
  java.lang.IndexOutOfBoundsException - if the calculated starting orending position is outside the bounds of the character array
exception:
  java.io.IOException - if an input/output error occurs
exception:
  java.lang.NullPointerException - if textis null



writeURIAttribute
public void writeURIAttribute(String name, Object value, String componentPropertyName) throws IOException(Code)

Write a URI attribute name and corresponding value (after converting that text to a String if necessary), after encoding it properly (for example, '%' encoded for HTML). This method may only be called after a call to startElement(), and before the opened element has been closed.


Parameters:
  name - Attribute name to be added
Parameters:
  value - Attribute value to be added
Parameters:
  componentPropertyName - May be null. Ifnon-null, this must be the name of the property onthe UIComponent passed in to a previous call to DocFragmentJspWriter.startElement to which this attribute corresponds.
exception:
  IllegalStateException - if this method is called when thereis no currently open element
exception:
  IOException - if an input/output error occurs
exception:
  NullPointerException - if name isnull



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.