Author: ivaynberg
Date: Tue Nov 14 16:45:40 2006
New Revision: 475088
URL: http://svn.apache.org/viewvc?view=rev&rev=475088
Log:
WICKET-68 fixed header contributors sometimes not working after first render
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/behavior/AbstractBehavior.java
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/behavior/AbstractBehavior.java
URL:
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/behavior/AbstractBehavior.java?view=diff&rev=475088&r1=475087&r2=475088
==============================================================================
---
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/behavior/AbstractBehavior.java
(original)
+++
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/behavior/AbstractBehavior.java
Tue Nov 14 16:45:40 2006
@@ -65,7 +65,14 @@
*/
public final void rendered(final Component component)
{
- onRendered(component);
+ try
+ {
+ onRendered(component);
+ }
+ finally
+ {
+ cleanup();
+ }
}
/**
@@ -82,10 +89,16 @@
* @see wicket.behavior.IBehavior#exception(wicket.Component,
* java.lang.RuntimeException)
*/
- public void exception(Component component, RuntimeException exception)
+ public final void exception(Component component, RuntimeException
exception)
{
- onException(component, exception);
- cleanup();
+ try
+ {
+ onException(component, exception);
+ }
+ finally
+ {
+ cleanup();
+ }
}
/**
@@ -112,7 +125,7 @@
public void cleanup()
{
}
-
+
/**
* @see wicket.behavior.IBehavior#getStatelessHint()
*/