Author: mgrigorov
Date: Tue Nov 22 08:29:07 2011
New Revision: 1204854
URL: http://svn.apache.org/viewvc?rev=1204854&view=rev
Log:
WICKET-4236 Use JQuery as a backing library for Wicket's JavaScript code
Rename Wicket.inCtx() to Wicket.bind() to be more close to the previous impl
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/progressbar.js
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
(original)
+++
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
Tue Nov 22 08:29:07 2011
@@ -177,12 +177,12 @@ public abstract class AbstractDefaultAja
buff.append("var
").append(IAjaxCallDecorator.WICKET_CALL_RESULT_VAR).append("=");
buff.append(partialCall);
- buff.append(", Wicket.inCtx(function() {
").append(success).append("}, this)");
- buff.append(", Wicket.inCtx(function() {
").append(failure).append("}, this)");
+ buff.append(", Wicket.bind(function() {
").append(success).append("}, this)");
+ buff.append(", Wicket.bind(function() {
").append(failure).append("}, this)");
if (precondition != null)
{
- buff.append(", Wicket.inCtx(function() {");
+ buff.append(", Wicket.bind(function() {");
buff.append(precondition);
buff.append("}, this)");
}
@@ -209,7 +209,7 @@ public abstract class AbstractDefaultAja
"if (");
if (precondition != null)
{
-
indicatorWithPrecondition.append("Wicket.inCtx(function(){")
+
indicatorWithPrecondition.append("Wicket.bind(function(){")
.append(precondition)
.append("}, this)()");
}
@@ -327,7 +327,7 @@ public abstract class AbstractDefaultAja
return new AppendingStringBuffer("Wicket.throttler.throttle(
'").append(throttleId)
.append("', ")
.append(throttleDelay.getMilliseconds())
- .append(", Wicket.inCtx(function() { ")
+ .append(", Wicket.bind(function() { ")
.append(script)
.append("}, this));");
}
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
(original)
+++
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
Tue Nov 22 08:29:07 2011
@@ -1060,7 +1060,7 @@ jQuery.noConflict();
* @param {Object} context - the new context for the function
* @return {Function} the original function with the changed
context
*/
- inCtx: function(fn, context) {
+ bind: function(fn, context) {
return jQuery.proxy(fn, context);
},
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
(original)
+++
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
Tue Nov 22 08:29:07 2011
@@ -1129,7 +1129,7 @@ public class Form<T> extends WebMarkupCo
buffer.append(defaultSubmittingComponent.getInputName());
buffer.append("\" onclick=\" var b=document.getElementById('");
buffer.append(submittingComponent.getMarkupId());
- buffer.append("'); if
(b!=null&&b.onclick!=null&&typeof(b.onclick) != 'undefined') {
var r = Wicket.inCtx(b.onclick, b)(); if (r != false) b.click(); } else {
b.click(); }; return false;\" ");
+ buffer.append("'); if
(b!=null&&b.onclick!=null&&typeof(b.onclick) != 'undefined') {
var r = Wicket.bind(b.onclick, b)(); if (r != false) b.click(); } else {
b.click(); }; return false;\" ");
buffer.append(" />");
// close div
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html
Tue Nov 22 08:29:07 2011
@@ -12,4 +12,4 @@ Wicket.Ajax.DebugWindow.enabled=true;
Wicket.Ajax.baseUrl="wicket/page?0-1.IBehaviorListener.0-comp";
/*]^]^>*/
</script>
-</head>]]></header-contribution><component id="comp1" ><![CDATA[<span
wicket:id="comp" id="comp1" onclick="var
wcall=Wicket.Ajax.get('page?0-1.IBehaviorListener.0-comp',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('comp1') !=
null;}.bind(this));">body</span>]]></component></ajax-response>
\ No newline at end of file
+</head>]]></header-contribution><component id="comp1" ><![CDATA[<span
wicket:id="comp" id="comp1" onclick="var
wcall=Wicket.Ajax.get('page?0-1.IBehaviorListener.0-comp',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('comp1') != null;},
this));">body</span>]]></component></ajax-response>
\ No newline at end of file
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html
Tue Nov 22 08:29:07 2011
@@ -14,6 +14,6 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
/*]]>*/
</script>
</head><body>
- <span wicket:id="comp" id="comp1" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-comp',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('comp1') != null;}.bind(this));">body</span>
+ <span wicket:id="comp" id="comp1" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-comp',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('comp1') != null;},
this));">body</span>
</body>
</html>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html
Tue Nov 22 08:29:07 2011
@@ -58,6 +58,6 @@ test
<span wicket:id="btest3" id="btest36"><wicket:panel>
test
</wicket:panel></span>
-<a href="../page?0-1.ILinkListener-link" wicket:id="link" id="link7"
onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-link',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('link7') != null;}.bind(this));return !wcall;">Test</a>
+<a href="../page?0-1.ILinkListener-link" wicket:id="link" id="link7"
onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-link',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('link7') != null;},
this));return !wcall;">Test</a>
</body>
</html>
\ No newline at end of file
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html
Tue Nov 22 08:29:07 2011
@@ -36,6 +36,6 @@ test
<span wicket:id="test3" id="test33"><wicket:panel>
test
</wicket:panel></span>
-<a href="../page?0-1.ILinkListener-link" wicket:id="link" id="link4"
onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-link',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('link4') != null;}.bind(this));return !wcall;">Test</a>
+<a href="../page?0-1.ILinkListener-link" wicket:id="link" id="link4"
onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-link',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('link4') != null;},
this));return !wcall;">Test</a>
</body>
</html>
\ No newline at end of file
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
Tue Nov 22 08:29:07 2011
@@ -12,4 +12,4 @@ Wicket.Ajax.DebugWindow.enabled=true;
Wicket.Ajax.baseUrl="wicket/page?0-1.IBehaviorListener.0-test";
/*]^]^>*/
</script>
-</head>]]></header-contribution><component id="test1" ><![CDATA[<a
href="page?0-1.ILinkListener-test" wicket:id="test" id="test1" onclick="var
wcall=Wicket.Ajax.get('page?0-1.IBehaviorListener.0-test',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('test1') != null;}.bind(this));return
!wcall;">Test</a>]]></component><evaluate><![CDATA[test1();]]></evaluate><evaluate><![CDATA[test2();]]></evaluate></ajax-response>
\ No newline at end of file
+</head>]]></header-contribution><component id="test1" ><![CDATA[<a
href="page?0-1.ILinkListener-test" wicket:id="test" id="test1" onclick="var
wcall=Wicket.Ajax.get('page?0-1.IBehaviorListener.0-test',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('test1') != null;},
this));return
!wcall;">Test</a>]]></component><evaluate><![CDATA[test1();]]></evaluate><evaluate><![CDATA[test2();]]></evaluate></ajax-response>
\ No newline at end of file
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
Tue Nov 22 08:29:07 2011
@@ -24,6 +24,6 @@ Wicket.Event.add(window, "domready", fun
/*]]>*/
</script>
</head><body>
-<a href="../page?0-1.ILinkListener-test" wicket:id="test" id="test1"
onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-test',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('test1') != null;}.bind(this));return !wcall;">Test</a>
+<a href="../page?0-1.ILinkListener-test" wicket:id="test" id="test1"
onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-test',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('test1') != null;},
this));return !wcall;">Test</a>
</body>
</html>
\ No newline at end of file
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html
Tue Nov 22 08:29:07 2011
@@ -17,7 +17,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
<form wicket:id="form" id="form1" method="post"
action="../page?0-1.IFormSubmitListener-form"><div
style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input
type="hidden" name="form1_hf_0" id="form1_hf_0" /></div>
<input type="text" wicket:id="txt1" value="foo"
name="txt1"/>
<input type="text" wicket:id="txt2" value="bar"
name="txt2"/>
- <input type="submit" value="Submit" wicket:id="submit"
name=":submit" id="submit2" onclick="var
wcall=Wicket.Ajax.submitForm('form1',
'../page?0-1.IBehaviorListener.0-form-submit', ':submit'
,function() { }.bind(this),function() { }.bind(this), function() {return
Wicket.$$(this) && Wicket.$$('form1')}.bind(this));;; return
false;"/>
+ <input type="submit" value="Submit" wicket:id="submit"
name=":submit" id="submit2" onclick="var
wcall=Wicket.Ajax.submitForm('form1',
'../page?0-1.IBehaviorListener.0-form-submit', ':submit' ,
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$$(this) &&
Wicket.$$('form1')}, this));;; return false;"/>
</form>
</body>
</html>
\ No newline at end of file
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
Tue Nov 22 08:29:07 2011
@@ -20,9 +20,9 @@ Wicket.Event.add(window, "domready", fun
</script>
</head><body>
<form wicket:id="form" id="form2" method="post"
action="../page?0-1.IFormSubmitListener-form"><div
style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input
type="hidden" name="form2_hf_0" id="form2_hf_0" /></div>
- <input type="text" wicket:id="field" value=""
name="field" id="field1" onchange="var
wcall=Wicket.Ajax.post('../page?0-1.IBehaviorListener.0-form-field',
Wicket.Form.serialize(Wicket.$('field1')),function() {
}.bind(this),function() { }.bind(this), function() {return
Wicket.$('field1') != null;}.bind(this));"/>
+ <input type="text" wicket:id="field" value=""
name="field" id="field1" onchange="var
wcall=Wicket.Ajax.post('../page?0-1.IBehaviorListener.0-form-field',
Wicket.Form.serialize(Wicket.$('field1')), Wicket.bind(function() {
}, this), Wicket.bind(function() { }, this), Wicket.bind(function() {return
Wicket.$('field1') != null;}, this));"/>
- <select wicket:id="dropDown" name="dropDown"
id="dropDown3" onchange="var
wcall=Wicket.Ajax.post('../page?0-1.IBehaviorListener.0-form-dropDown',
Wicket.Form.serialize(Wicket.$('dropDown3')),function() {
}.bind(this),function() { }.bind(this), function() {return
Wicket.$('dropDown3') != null;}.bind(this));">
+ <select wicket:id="dropDown" name="dropDown"
id="dropDown3" onchange="var
wcall=Wicket.Ajax.post('../page?0-1.IBehaviorListener.0-form-dropDown',
Wicket.Form.serialize(Wicket.$('dropDown3')), Wicket.bind(function()
{ }, this), Wicket.bind(function() { }, this), Wicket.bind(function() {return
Wicket.$('dropDown3') != null;}, this));">
<option selected="selected" value="">Choose One</option>
</select>
</form>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html
Tue Nov 22 08:29:07 2011
@@ -15,6 +15,6 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
</script>
</head><body>
<span wicket:id="ajaxLabel" id="ajaxLabel1">UpdateMe</span>
- <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-ajaxLink',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('ajaxLink2') != null;}.bind(this));return !wcall;">Update</a>
+ <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-ajaxLink',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('ajaxLink2') != null;},
this));return !wcall;">Update</a>
</body>
</html>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html
Tue Nov 22 08:29:07 2011
@@ -18,7 +18,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
Border
<wicket:body>
<span wicket:id="ajaxLabel" id="ajaxLabel1">UpdateMe</span>
- <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-border-border_body-ajaxLink',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('ajaxLink2') != null;}.bind(this));return !wcall;">Update</a>
+ <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-border-border_body-ajaxLink',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('ajaxLink2') != null;},
this));return !wcall;">Update</a>
</wicket:body>
Border
</wicket:border></span>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html
Tue Nov 22 08:29:07 2011
@@ -23,7 +23,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
<td width = "100%">
<wicket:body>
<span wicket:id="ajaxLabel" id="ajaxLabel1">AAAAAAA</span>
- <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-pageLayout-pageLayout_body-ajaxLink',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('ajaxLink2') != null;}.bind(this));return !wcall;">Update</a>
+ <a href="#" wicket:id="ajaxLink" id="ajaxLink2" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-pageLayout-pageLayout_body-ajaxLink',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('ajaxLink2') != null;},
this));return !wcall;">Update</a>
</wicket:body>
</td>
</tr>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html
Tue Nov 22 08:29:07 2011
@@ -12,4 +12,4 @@ Wicket.Ajax.DebugWindow.enabled=true;
Wicket.Ajax.baseUrl="wicket/page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1";
/*]^]^>*/
</script>
-</head>]]></header-contribution><component id="linja11" ><![CDATA[<span
wicket:id="linja1"
id="linja11">1</span>]]></component><evaluate><![CDATA[setTimeout("var
wcall=Wicket.Ajax.get('page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1',function()
{ }.bind(this),function() { }.bind(this), function() {var c =
Wicket.$('linja11'); return typeof(c) != 'undefined' && c !=
null}.bind(this));", 2000);]]></evaluate></ajax-response>
\ No newline at end of file
+</head>]]></header-contribution><component id="linja11" ><![CDATA[<span
wicket:id="linja1"
id="linja11">1</span>]]></component><evaluate><![CDATA[setTimeout("var
wcall=Wicket.Ajax.get('page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {var c = Wicket.$('linja11'); return typeof(c) !=
'undefined' && c != null}, this));", 2000);]]></evaluate></ajax-response>
\ No newline at end of file
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html
Tue Nov 22 08:29:07 2011
@@ -17,7 +17,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
</script>
<script type="text/javascript" >
/*<![CDATA[*/
-Wicket.Event.add(window, "load", function(event) { setTimeout("var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1',function()
{ }.bind(this),function() { }.bind(this), function() {var c =
Wicket.$('linja11'); return typeof(c) != 'undefined' && c !=
null}.bind(this));", 2000);;});
+Wicket.Event.add(window, "load", function(event) { setTimeout("var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-testPanel-baseSpan-linja1',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {var c = Wicket.$('linja11'); return typeof(c) !=
'undefined' && c != null}, this));", 2000);;});
/*]]>*/
</script>
</head>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html
Tue Nov 22 08:29:07 2011
@@ -1,7 +1,7 @@
<? xml version= "1.0" encoding ="UTF-8" ?>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html wicket:id="html" xmlns:wicket="" xmlns="http://www.w3.org/1999/xhtml"
xmlns:lang="[current language]" lang="de" id="html1" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.1-html',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('html1') != null;}.bind(this));return !wcall;">
+<html wicket:id="html" xmlns:wicket="" xmlns="http://www.w3.org/1999/xhtml"
xmlns:lang="[current language]" lang="de" id="html1" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.1-html',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('html1') != null;},
this));return !wcall;">
<head><script type="text/javascript"
src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/jquery/jquery.min.js"></script>
<script type="text/javascript"
src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery.js"></script>
<script type="text/javascript"
src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html
Tue Nov 22 08:29:07 2011
@@ -15,7 +15,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
</script>
</head><body>
<div wicket:id="hideable"><wicket:border>
- <a wicket:id="hideLink" id="hideLink1" href="#" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-hideable-hideLink',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('hideLink1') != null;}.bind(this));return !wcall;">Hide
contents</a>
+ <a wicket:id="hideLink" id="hideLink1" href="#" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-hideable-hideLink',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('hideLink1') != null;},
this));return !wcall;">Hide contents</a>
<div wicket:id="wrapper" id="wrapper2">
<wicket:body>
Contents <span wicket:id="content">label</span>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html
Tue Nov 22 08:29:07 2011
@@ -27,7 +27,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
-<a wicket:id="ajaxRefresh" id="ajaxRefresh2" href="#" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-provider-ajaxRefresh',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('ajaxRefresh2') != null;}.bind(this));return !wcall;">AJAX
refresh</a>
+<a wicket:id="ajaxRefresh" id="ajaxRefresh2" href="#" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-provider-ajaxRefresh',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('ajaxRefresh2') != null;},
this));return !wcall;">AJAX refresh</a>
</wicket:panel></div>
Modified:
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html
(original)
+++
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html
Tue Nov 22 08:29:07 2011
@@ -19,7 +19,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
<span wicket:id="number">0</span><br/>
<div id="nextContainer1" style="display:none"></div>
</div>
-<a wicket:id="add" id="add2" href="#" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-add',function()
{ }.bind(this),function() { }.bind(this), function() {return
Wicket.$('add2') != null;}.bind(this));return !wcall;">Add</a>
+<a wicket:id="add" id="add2" href="#" onclick="var
wcall=Wicket.Ajax.get('../page?0-1.IBehaviorListener.0-add',
Wicket.bind(function() { }, this), Wicket.bind(function() { }, this),
Wicket.bind(function() {return Wicket.$('add2') != null;},
this));return !wcall;">Add</a>
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/UploadProgressBar.java
Tue Nov 22 08:29:07 2011
@@ -223,7 +223,7 @@ public class UploadProgressBar extends P
Formatter formatter = new Formatter(builder);
formatter.format(
- "Wicket.inCtx(new Wicket.WUPB('%s', '%s', '%s', '%s',
'%s', '%s'), Wicket.$('%s'))",
+ "Wicket.bind(new Wicket.WUPB('%s', '%s', '%s', '%s',
'%s', '%s'), Wicket.$('%s'))",
getMarkupId(), statusDiv.getMarkupId(),
barDiv.getMarkupId(), url, uploadFieldId,
status, getCallbackForm().getMarkupId());
response.renderOnDomReadyJavaScript(builder.toString());
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/progressbar.js
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/progressbar.js?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/progressbar.js
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/progressbar.js
Tue Nov 22 08:29:07 2011
@@ -31,7 +31,7 @@ Wicket.WUPB.prototype = {
bind : function(formid) {
formElement = Wicket.$(formid);
this.originalCallback = formElement.onsubmit;
- formElement.onsubmit = Wicket.inCtx(this.submitCallback, this);
+ formElement.onsubmit = Wicket.bind(this.submitCallback, this);
},
submitCallback : function() {
@@ -73,7 +73,7 @@ Wicket.WUPB.prototype = {
},
scheduleUpdate : function(){
- window.setTimeout(Wicket.inCtx(this.load, this), 1000);
+ window.setTimeout(Wicket.bind(this.load, this), 1000);
},
load : function() {
@@ -83,7 +83,7 @@ Wicket.WUPB.prototype = {
document.body.appendChild(this.iframe);
- Wicket.Event.add(this.iframe, "load", Wicket.inCtx(this.update,
this));
+ Wicket.Event.add(this.iframe, "load", Wicket.bind(this.update,
this));
this.iframe.src = URL;
},
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js?rev=1204854&r1=1204853&r2=1204854&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Tue Nov 22 08:29:07 2011
@@ -302,7 +302,7 @@ Wicket.Window.prototype = {
title: null, /* window title. if null and window
content is iframe, title of iframe document will be used. */
- onCloseButton: Wicket.inCtx(function() {
+ onCloseButton: Wicket.bind(function() {
/* On firefox on Linux, at least, we need to
blur() textfields, etc.
* to get it to update its DOM model. Otherwise
you'll lose any changes
* made to the current form component you're
editing.
@@ -409,7 +409,7 @@ Wicket.Window.prototype = {
* Binds the handler to the drag event on given element.
*/
bind: function(element, handler) {
- Wicket.Drag.init(element, Wicket.inCtx(this.onBegin, this),
Wicket.inCtx(this.onEnd, this), Wicket.inCtx(handler, this));
+ Wicket.Drag.init(element, Wicket.bind(this.onBegin, this),
Wicket.bind(this.onEnd, this), Wicket.bind(handler, this));
},
/**
@@ -445,7 +445,7 @@ Wicket.Window.prototype = {
this.bind(this.top, this.onMove);
}
- this.caption.getElementsByTagName("a")[0].onclick =
Wicket.inCtx(this.settings.onCloseButton, this);
+ this.caption.getElementsByTagName("a")[0].onclick =
Wicket.bind(this.settings.onCloseButton, this);
},
/**
@@ -617,11 +617,11 @@ Wicket.Window.prototype = {
*/
load: function() {
if (this.settings.title == null)
- this.update =
window.setInterval(Wicket.inCtx(this.updateTitle, this), 100);
+ this.update =
window.setInterval(Wicket.bind(this.updateTitle, this), 100);
// opera seems to have problem accessing contentWindow here
if (Wicket.Browser.isOpera()) {
- this.content.onload = Wicket.inCtx(function() {
+ this.content.onload = Wicket.bind(function() {
this.content.contentWindow.name =
this.settings.iframeName;
}, this);
} else {
@@ -698,7 +698,7 @@ Wicket.Window.prototype = {
// load position from cookie
this.loadPosition();
- var doShow = Wicket.inCtx(function() {
+ var doShow = Wicket.bind(function() {
this.adjustOpenWindowZIndexesOnShow();
this.window.style.visibility="visible";
@@ -726,7 +726,7 @@ Wicket.Window.prototype = {
this.old_onunload = window.onunload;
// new unload handler - close the window to prevent memory
leaks in ie
- window.onunload = Wicket.inCtx(function() {
+ window.onunload = Wicket.bind(function() {
this.close(true);
if (this.old_onunload != null)
return this.old_onunload();
@@ -892,7 +892,7 @@ Wicket.Window.prototype = {
// konqueror doesn't refresh caption
text properly
if (Wicket.Browser.isKHTML()) {
this.captionText.style.display
= 'none';
-
window.setTimeout(Wicket.inCtx(function() {
this.captionText.style.display="block";}, this), 0);
+
window.setTimeout(Wicket.bind(function() {
this.captionText.style.display="block";}, this), 0);
}
}
@@ -922,7 +922,7 @@ Wicket.Window.prototype = {
this.revertList = null;
if (Wicket.Browser.isKHTML() ||
this.content.style.visibility=='hidden') {
this.content.style.visibility='hidden';
- window.setTimeout(Wicket.inCtx(function() {
this.content.style.visibility='visible'; }, this), 0 );
+ window.setTimeout(Wicket.bind(function() {
this.content.style.visibility='visible'; }, this), 0 );
}
this.revertList = null;
}
@@ -1307,8 +1307,8 @@ Wicket.Window.Mask.prototype = {
this.old_onresize = window.onresize;
// set new handlers
- window.onscroll = Wicket.inCtx(this.onScrollResize,
this);
- window.onresize = Wicket.inCtx(this.onScrollResize,
this);
+ window.onscroll = Wicket.bind(this.onScrollResize,
this);
+ window.onresize = Wicket.bind(this.onScrollResize,
this);
// fix the mask position
this.onScrollResize(true);
@@ -1367,7 +1367,7 @@ Wicket.Window.Mask.prototype = {
tasks: [],
startTask: function (fn, delay) {
- var taskId=setTimeout(Wicket.inCtx(function() { fn();
this.clearTask(taskId); }, this), delay);
+ var taskId=setTimeout(Wicket.bind(function() { fn();
this.clearTask(taskId); }, this), delay);
this.tasks.push(taskId);
},
clearTask: function (taskId) {
@@ -1391,9 +1391,9 @@ Wicket.Window.Mask.prototype = {
// disable user interaction for content that is covered by the mask
inside the given document, taking into consideration that this modal window is
or not in an iframe
// and has the given content
doDisable: function(doc, win) {
- this.startTask(Wicket.inCtx(function()
{this.hideSelectBoxes(doc, win)}, this), 300);
- this.startTask(Wicket.inCtx(function() {this.disableTabs(doc,
win)}, this), 400);
- this.startTask(Wicket.inCtx(function() {this.disableFocus(doc,
win)}, this), 1000);
+ this.startTask(Wicket.bind(function()
{this.hideSelectBoxes(doc, win)}, this), 300);
+ this.startTask(Wicket.bind(function() {this.disableTabs(doc,
win)}, this), 400);
+ this.startTask(Wicket.bind(function() {this.disableFocus(doc,
win)}, this), 1000);
},
// reenable user interaction for content that was covered by the mask