You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by kn...@apache.org on 2007/12/01 01:21:11 UTC
svn commit: r600023 -
/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: knopp
Date: Fri Nov 30 16:21:10 2007
New Revision: 600023
URL: http://svn.apache.org/viewvc?rev=600023&view=rev
Log:
properly namespace lastFocusId
Modified:
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=600023&r1=600022&r2=600023&view=diff
==============================================================================
--- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original)
+++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Fri Nov 30 16:21:10 2007
@@ -1880,34 +1880,34 @@
// Use "srcElement" instead.
var target = event.target ? event.target : event.srcElement;
if (target) {
- lastFocusId=target.id;
- Wicket.Log.info("focus set on " + lastFocusId);
+ Wicket.Focus.lastFocusId=target.id;
+ Wicket.Log.info("focus set on " + Wicket.Focus.lastFocusId);
}
},
setFocusOnId: function(id)
{
- lastFocusId=id;
- Wicket.Log.info("focus set on " + lastFocusId + " from serverside");
+ Wicket.Focus.lastFocusId=id;
+ Wicket.Log.info("focus set on " + Wicket.Focus.lastFocusId + " from serverside");
},
getFocusedElement: function()
{
- if (typeof(lastFocusId) != "undefined" && lastFocusId != "" && lastFocusId != null)
+ if (typeof(Wicket.Focus.lastFocusId) != "undefined" && Wicket.Focus.lastFocusId != "" && Wicket.Focus.lastFocusId != null)
{
- Wicket.Log.info("returned focused element: " + Wicket.$(lastFocusId));
- return Wicket.$(lastFocusId);
+ Wicket.Log.info("returned focused element: " + Wicket.$(Wicket.Focus.lastFocusId));
+ return Wicket.$(Wicket.Focus.lastFocusId);
}
return;
},
requestFocus: function()
{
- if (typeof(lastFocusId) != "undefined" && lastFocusId != "" && lastFocusId != null)
+ if (typeof(Wicket.Focus.lastFocusId) != "undefined" && Wicket.Focus.lastFocusId != "" && Wicket.Focus.lastFocusId != null)
{
- var toFocus = Wicket.$(lastFocusId);
+ var toFocus = Wicket.$(Wicket.Focus.lastFocusId);
if (toFocus != null && typeof(toFocus) != "undefined") {
- Wicket.Log.info("Calling focus on " + lastFocusId);
+ Wicket.Log.info("Calling focus on " + Wicket.Focus.lastFocusId);
try {
toFocus.focus();
} catch (ignore) {
@@ -1915,8 +1915,8 @@
}
else
{
- lastFocusId = "";
- Wicket.Log.info("Couldn't set focus on " + lastFocusId + " not on the page anymore");
+ Wicket.Focus.lastFocusId = "";
+ Wicket.Log.info("Couldn't set focus on " + Wicket.Focus.lastFocusId + " not on the page anymore");
}
}
else