Java Doc for ComponentSynchronizePeer.java in  » Ajax » NextApp-Echo2 » nextapp » echo2 » webcontainer » 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 » Ajax » NextApp Echo2 » nextapp.echo2.webcontainer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


nextapp.echo2.webcontainer.ComponentSynchronizePeer

All known Subclasses:   nextapp.echo2.webcontainer.syncpeer.WindowPanePeer,  nextapp.echo2.webcontainer.syncpeer.LabelPeer,  nextapp.echo2.webcontainer.syncpeer.ContentPanePeer,  nextapp.echo2.webcontainer.syncpeer.CompositePeer,  nextapp.echo2.webcontainer.syncpeer.SplitPanePeer,  nextapp.echo2.webcontainer.syncpeer.GridPeer,  nextapp.echo2.webcontainer.syncpeer.TextComponentPeer,  nextapp.echo2.webcontainer.syncpeer.RowPeer,  nextapp.echo2.webcontainer.syncpeer.ButtonPeer,  nextapp.echo2.webcontainer.syncpeer.ColumnPeer,  nextapp.echo2.webcontainer.syncpeer.ListComponentPeer,  nextapp.echo2.webcontainer.syncpeer.TablePeer,
ComponentSynchronizePeer
public interface ComponentSynchronizePeer (Code)
A stateless peer object used to synchronize the state of a given type of nextapp.echo2.app.Component between the server and client.

A ComponentSynchronizePeer may implement optional interfaces such as DomUpdateSupport which enables rendering hierarchies of components directly to (X)HTML code. The optional ActionProcessor and InputProcessor interfaces may be used when the client-side rendering of the component may send back information to the server in response to user input.

A single instance of a given ComponentSynchronizePeer will be created to synchronize the state of ALL instances of a particular class of Component. Thus, it is not possible to store information about a component's state in this object (in contrast to Echo v1.x, where a peer was created for each component instance). Such rendering state information should now be stored in the ContainerInstance, see the ContainerInstance.setRenderState() method for details.





Method Summary
public  StringgetContainerId(Component child)
     Returns the id of the HTML element in which the specified component should be rendered.
public  voidrenderAdd(RenderContext rc, ServerComponentUpdate update, String targetId, Component component)
     Renders a client update which adds an HTML representation of the provided component to the client DOM as a child of the HTML element identified by targetId.
public  voidrenderDispose(RenderContext rc, ServerComponentUpdate update, Component component)
     Renders a client update to dispose of resources/listeners created for the specified component on the client.
public  booleanrenderUpdate(RenderContext rc, ServerComponentUpdate update, String targetId)
     Renders the specified ServerComponentUpdate by adding and removing children and updating properties of the specified component.

If the component is not a container, the implementation only needs to analyze the updated properties of the component.




Method Detail
getContainerId
public String getContainerId(Component child)(Code)
Returns the id of the HTML element in which the specified component should be rendered. The specified component must be an immediate child of an instance of the class of component that this peer supports. A child component's renderer may invoke this method to determine where it should place its rendered content.
Parameters:
  child - a Component whose parent is of the typesynchronized by this peer object. the id of the element which should contain the childcomponent's rendered HTML.



renderAdd
public void renderAdd(RenderContext rc, ServerComponentUpdate update, String targetId, Component component)(Code)
Renders a client update which adds an HTML representation of the provided component to the client DOM as a child of the HTML element identified by targetId.
Parameters:
  rc - the relevant RenderContext
Parameters:
  update - the ServerComponentUpdate for which thisoperation is being performed
Parameters:
  targetId - the id of the HTML element in which the component'sHTML output should be rendered
Parameters:
  component - the component to be rendered (this component mustbe of a type supported by this synchronization peer).



renderDispose
public void renderDispose(RenderContext rc, ServerComponentUpdate update, Component component)(Code)
Renders a client update to dispose of resources/listeners created for the specified component on the client. Operations such as removing event listeners on the client should be performed by the implementation. In cases where no such clean-up work is required, an empty implementation is sufficient. Note that the actual removal of HTML code will be performed by an ancestor component's renderUpdate() method being invoked, and thus implementations SHOULD NOT redundantly attempt to remove the HTML in this method. Implementations must handle the condition where the component to be disposed is not present in the client DOM, as this method may be invoked under such a condition.
Parameters:
  rc - the relevant RenderContext
Parameters:
  update - the ServerComponentUpdate for which thisoperation is being performed



renderUpdate
public boolean renderUpdate(RenderContext rc, ServerComponentUpdate update, String targetId)(Code)
Renders the specified ServerComponentUpdate by adding and removing children and updating properties of the specified component.

If the component is not a container, the implementation only needs to analyze the updated properties of the component. If the component is a container, the implementation should additionally query update for information about added children, removed children, and children with updated LayoutData states.

The implementation is responsible for rendering added children by obtaining their ComponentSynchronizePeers and invoking their renderAdd() methods. Alternatively, if a child's ComponentSynchronizePeer implements the DomUpdateSupport interface, the implementation may invoke the child peer's renderHtml() method instead.

This method should return true if, in the course of its rendering operation, it has re-rendered the entire component hierarchy beneath the parent component of the update. Returning true will ensure that updates to descendants are NOT rendered. The method should return false in all cases if the component is not a container.
Parameters:
  rc - the relevant RenderContext
Parameters:
  update - the ServerComponentUpdate for which thisoperation is being performed
Parameters:
  targetId - the id of the HTML element inside of which the components HTML code should be rendered. true if updates to descendants should NOT be performed




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