Source Code Cross Referenced for IBehavior.java in  » J2EE » wicket » wicket » behavior » 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 » J2EE » wicket » wicket.behavior 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: IBehavior.java 508111 2007-02-15 19:50:42Z ivaynberg $ $Revision:
003:         * 1.5 $ $Date: 2007-02-15 20:50:42 +0100 (Thu, 15 Feb 2007) $
004:         * 
005:         * ==============================================================================
006:         * Licensed under the Apache License, Version 2.0 (the "License"); you may not
007:         * use this file except in compliance with the License. You may obtain a copy of
008:         * the License at
009:         * 
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         * 
012:         * Unless required by applicable law or agreed to in writing, software
013:         * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
014:         * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
015:         * License for the specific language governing permissions and limitations under
016:         * the License.
017:         */
018:        package wicket.behavior;
019:
020:        import java.io.Serializable;
021:
022:        import wicket.Component;
023:        import wicket.markup.ComponentTag;
024:
025:        /**
026:         * Behaviors are kind of plug-ins for Components. They allow to be added to a
027:         * component and get essential events forwarded by the component. they can be
028:         * bound to a concrete component (using the bind method is called when the
029:         * behavior is attached), but they don't need to. They can modify the components
030:         * markup by changing the rendered ComponentTag. Behaviors can have their own
031:         * models as well, and they are notified when these are to be detached by the
032:         * component.
033:         * <p>
034:         * It is recommended that you extend from
035:         * {@link wicket.behavior.AbstractBehavior} instead of directly implementing
036:         * this interface.
037:         * </p>
038:         * 
039:         * @see wicket.behavior.IBehaviorListener
040:         * @see wicket.markup.html.IHeaderContributor
041:         * @see wicket.behavior.AbstractAjaxBehavior
042:         * @see wicket.AttributeModifier
043:         * 
044:         * @author Ralf Ebert
045:         * @author Eelco Hillenius
046:         */
047:        public interface IBehavior extends Serializable {
048:            /**
049:             * Bind this handler to the given component. This method is called by the
050:             * host component immediately after this behavior is added to it. This
051:             * method is useful if you need to do initialization based on the component
052:             * it is attached can you can't wait to do it at render time. Keep in mind
053:             * that if you decide to keep a reference to the host component, it is not
054:             * thread safe anymore, and should thus only be used in situations where you
055:             * do not reuse the behavior for multiple components.
056:             * 
057:             * @param component
058:             *            the component to bind to
059:             */
060:            void bind(Component component);
061:
062:            /**
063:             * Provides for the ability to detach any models this behavior has. This
064:             * method is called by the components which have this behavior attached to
065:             * them when they are detaching their models themselves (ie after
066:             * rendering). Note that if you share a behavior between components, this
067:             * method is called multiple times.
068:             * 
069:             * YOU MUST CALL SUPER WHEN IMPLEMENTING THIS METHOD
070:             * 
071:             * @param component
072:             *            the component that initiates the detachement of this behavior
073:             */
074:            void detachModel(Component component);
075:
076:            /**
077:             * Called any time a component that has this behavior registered is
078:             * rendering the component tag.
079:             * 
080:             * @param component
081:             *            the component that renders this tag currently
082:             * @param tag
083:             *            the tag that is rendered
084:             */
085:            void onComponentTag(Component component, ComponentTag tag);
086:
087:            /**
088:             * Called when a component that has this behavior coupled was rendered.
089:             * 
090:             * @param component
091:             *            the component that has this behavior coupled
092:             */
093:            void rendered(Component component);
094:
095:            /**
096:             * In case an unexpected exception happened anywhere between
097:             * onComponentTag() and rendered(), onException() will be called for any
098:             * behavior. Typically, if you clean up resources in
099:             * {@link #rendered(Component)}, you should do the same in the
100:             * implementation of this method.
101:             * 
102:             * @param component
103:             *            the component that has a reference to this behavior and during
104:             *            which processing the exception occured
105:             * @param exception
106:             *            the unexpected exception
107:             */
108:            void exception(Component component, RuntimeException exception);
109:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.