You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2010/08/31 01:51:44 UTC
svn commit: r991034 -
/wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
Author: ivaynberg
Date: Mon Aug 30 23:51:44 2010
New Revision: 991034
URL: http://svn.apache.org/viewvc?rev=991034&view=rev
Log:
WICKET-2850
Modified:
wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
Modified: wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java?rev=991034&r1=991033&r2=991034&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java (original)
+++ wicket/branches/wicket-1.4.x/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java Mon Aug 30 23:51:44 2010
@@ -329,10 +329,13 @@ public class DatePicker extends Abstract
// ajax requests to not render the yui calendar multiple times
if (AjaxRequestTarget.get() != null)
{
- final String javascript = "var e = Wicket.$('" + getEscapedComponentMarkupId() + "Dp" +
+ final String escapedComponentMarkupId = getEscapedComponentMarkupId();
+ final String javascript = "var e = Wicket.$('" + escapedComponentMarkupId + "Dp" +
"'); if (e != null && typeof(e.parentNode) != 'undefined' && " +
"typeof(e.parentNode.parentNode != 'undefined')) " +
- "e.parentNode.parentNode.removeChild(e.parentNode);";
+ "e.parentNode.parentNode.removeChild(e.parentNode);" + "YAHOO.wicket." +
+ escapedComponentMarkupId + "DpJs.destroy(); delete YAHOO.wicket." +
+ escapedComponentMarkupId + "DpJs;";
response.renderJavascript(javascript, null);
}