You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2010/12/29 15:36:35 UTC
svn commit: r1053642 - in /wicket/trunk:
wicket-core/src/main/java/org/apache/wicket/ajax/
wicket-core/src/main/java/org/apache/wicket/markup/
wicket-core/src/main/java/org/apache/wicket/markup/parser/
wicket-core/src/test/java/org/apache/wicket/ wicke...
Author: mgrigorov
Date: Wed Dec 29 14:36:34 2010
New Revision: 1053642
URL: http://svn.apache.org/viewvc?rev=1053642&view=rev
Log:
WICKET-2829 Tag attributes values are not escaped properly during writeOutput
XML escape (", ', &, <, >) all attribute values.
Tested wicket-examples with Firefox 3.6.14pre and Google Chrome 9.x.
Need to test on Internet Explorer!
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.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/markup/html/basic/SimplePageExpectedResult_13.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_11.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/link/AutolinkPageExpectedResult_1.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_2.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/BookmarkableHomePageLinksPage_result.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-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_mount_result.html
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_result.html
wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html
wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java
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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -23,6 +23,7 @@ import org.apache.wicket.behavior.Abstra
import org.apache.wicket.markup.html.IHeaderResponse;
import org.apache.wicket.markup.html.WicketEventReference;
import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.Url;
import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.resource.JavaScriptResourceReference;
import org.apache.wicket.request.resource.PackageResourceReference;
@@ -80,9 +81,10 @@ public abstract class AbstractDefaultAja
response.renderJavaScript("wicketAjaxDebugEnable=true;", "wicket-ajax-debug-enable");
}
- // TODO NG Escape
- response.renderJavaScript("Wicket.Ajax.baseUrl=\"" +
- RequestCycle.get().getUrlRenderer().getBaseUrl() + "\";", "wicket-ajax-base-url");
+ Url baseUrl = RequestCycle.get().getUrlRenderer().getBaseUrl();
+ CharSequence ajaxBaseUrl = Strings.escapeMarkup(baseUrl.toString());
+ response.renderJavaScript("Wicket.Ajax.baseUrl=\"" + ajaxBaseUrl + "\";",
+ "wicket-ajax-base-url");
}
/**
Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java (original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/ComponentTag.java Wed Dec 29 14:36:34 2010
@@ -705,7 +705,7 @@ public class ComponentTag extends Markup
if (value != null)
{
response.write("=\"");
- value = Strings.replaceAll(value, "\"", """);
+ value = Strings.escapeMarkup(value);
response.write(value);
response.write("\"");
}
Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java (original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlTag.java Wed Dec 29 14:36:34 2010
@@ -643,7 +643,7 @@ public class XmlTag extends MarkupElemen
if (value != null)
{
buffer.append("=\"");
- value = Strings.replaceAll(value, "\"", "\\\"");
+ value = Strings.escapeMarkup(value);
buffer.append(value);
buffer.append("\"");
}
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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -7,4 +7,4 @@ wicketAjaxDebugEnable=true;
<script type="text/javascript" id="wicket-ajax-base-url"><!--/*--><![CDATA[/*><!--*/
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=wicketAjaxGet('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=wicketAjaxGet('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
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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -9,6 +9,6 @@ wicketAjaxDebugEnable=true;
Wicket.Ajax.baseUrl="wicket/bookmarkable/org.apache.wicket.TestDetachPage?0";
/*-->]]>*/</script>
</head><body>
- <span wicket:id="comp" id="comp1" onclick="var wcall=wicketAjaxGet('../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=wicketAjaxGet('../page?0-1.IBehaviorListener.0-comp',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('comp1') != null;}.bind(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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -45,6 +45,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=wicketAjaxGet('../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=wicketAjaxGet('../page?0-1.IBehaviorListener.0-link',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('link7') != null;}.bind(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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -27,6 +27,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=wicketAjaxGet('../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=wicketAjaxGet('../page?0-1.IBehaviorListener.0-link',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('link4') != null;}.bind(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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -7,4 +7,4 @@ wicketAjaxDebugEnable=true;
<script type="text/javascript" id="wicket-ajax-base-url"><!--/*--><![CDATA[/*><!--*/
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=wicketAjaxGet('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=wicketAjaxGet('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
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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -15,6 +15,6 @@ Wicket.Event.add(window, "domready", fun
Wicket.Event.add(window, "domready", function(event) { test2();;});
/*-->]]>*/</script>
</head><body>
-<a href="../page?0-1.ILinkListener-test" wicket:id="test" id="test1" onclick="var wcall=wicketAjaxGet('../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=wicketAjaxGet('../page?0-1.IBehaviorListener.0-test',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('test1') != null;}.bind(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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -12,7 +12,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=wicketSubmitFormById('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=wicketSubmitFormById('form1', '../page?0-1.IBehaviorListener.0-form-submit', ':submit' ,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('form1')}.bind(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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -10,12 +10,12 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
/*-->]]>*/</script>
</head><body>
<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="field" value="" name="field" id="field2" onchange="var wcall=wicketAjaxPost('../page?0-1.IBehaviorListener.0-form-field', wicketSerialize(Wicket.$('field2')),function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('field2') != null;}.bind(this));"/><script type="text/javascript"><!--/*--><![CDATA[/*><!--*/
+ <input type="text" wicket:id="field" value="" name="field" id="field2" onchange="var wcall=wicketAjaxPost('../page?0-1.IBehaviorListener.0-form-field', wicketSerialize(Wicket.$('field2')),function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('field2') != null;}.bind(this));"/><script type="text/javascript"><!--/*--><![CDATA[/*><!--*/
new Wicket.ChangeHandler('field2');
/*-->]]>*/</script>
- <select wicket:id="dropDown" name="dropDown" id="dropDown3" onchange="var wcall=wicketAjaxPost('../page?0-1.IBehaviorListener.0-form-dropDown', wicketSerialize(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=wicketAjaxPost('../page?0-1.IBehaviorListener.0-form-dropDown', wicketSerialize(Wicket.$('dropDown3')),function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('dropDown3') != null;}.bind(this));">
<option selected="selected" value="-1">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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -10,6 +10,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=wicketAjaxGet('../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=wicketAjaxGet('../page?0-1.IBehaviorListener.0-ajaxLink',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('ajaxLink2') != null;}.bind(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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -13,7 +13,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=wicketAjaxGet('../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=wicketAjaxGet('../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>
</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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -18,7 +18,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=wicketAjaxGet('../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=wicketAjaxGet('../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>
</wicket:body>
</td>
</tr>
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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -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=wicketAjaxGet('../page?0-1.IBehaviorListener.0-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=wicketAjaxGet('../page?0-1.IBehaviorListener.0-html',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('html1') != null;}.bind(this));return !wcall;">
<head><script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
<script type="text/javascript" src="../resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_11.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_11.html?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_11.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/border/BoxBorderTestPage_ExpectedResult_11.html Wed Dec 29 14:36:34 2010
@@ -1,27 +1,27 @@
-<!--
- ====================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<body>
- <span wicket:id="border"><wicket:border>
- <h3 class="collapse" wicket:id="title" onclick="var win = this.ownerDocument.defaultView || this.ownerDocument.parentWindow; if (win == window) { window.location.href='../page?0-1.ILinkListener-border-title'; } ;return false">
- <span class="label" wicket:id="titleLabel">model</span>
- <a class="foldicon"> </a>
- </h3>
- <wicket:body>
- <div wicket:id="label">my test</div>
- </wicket:body>
-</wicket:border></span>
-</body>
-</html>
+<!--
+ ====================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html>
+<body>
+ <span wicket:id="border"><wicket:border>
+ <h3 class="collapse" wicket:id="title" onclick="var win = this.ownerDocument.defaultView || this.ownerDocument.parentWindow; if (win == window) { window.location.href='../page?0-1.ILinkListener-border-title'; } ;return false">
+ <span class="label" wicket:id="titleLabel">model</span>
+ <a class="foldicon"> </a>
+ </h3>
+ <wicket:body>
+ <div wicket:id="label">my test</div>
+ </wicket:body>
+</wicket:border></span>
+</body>
+</html>
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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -10,7 +10,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=wicketAjaxGet('../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=wicketAjaxGet('../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>
<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/link/AutolinkPageExpectedResult_1.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_1.html Wed Dec 29 14:36:34 2010
@@ -16,7 +16,7 @@
<wicket:link autolink="false">
<a href="../../Page1.html">Home</a>
<wicket:link autolink="true">
- <a href="org.apache.wicket.markup.html.link.Page1?id=123&name=test">Home</a>
+ <a href="org.apache.wicket.markup.html.link.Page1?id=123&amp;name=test">Home</a>
</wicket:link>
</wicket:link>
<!-- valid till the end of the document or the next link tag -->
Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_2.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_2.html?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_2.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/AutolinkPageExpectedResult_2.html Wed Dec 29 14:36:34 2010
@@ -16,7 +16,7 @@
<a href="../../Page1.html">Home</a>
- <a href="org.apache.wicket.markup.html.link.Page1?id=123&name=test">Home</a>
+ <a href="org.apache.wicket.markup.html.link.Page1?id=123&amp;name=test">Home</a>
<!-- valid till the end of the document or the next link tag -->
Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/BookmarkableHomePageLinksPage_result.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/BookmarkableHomePageLinksPage_result.html?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/BookmarkableHomePageLinksPage_result.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/link/BookmarkableHomePageLinksPage_result.html Wed Dec 29 14:36:34 2010
@@ -15,7 +15,7 @@
<html xmlns:wicket>
<body>
<a wicket:id="defaulthompage" href="org.apache.wicket.mock.MockHomePage"></a>
- <a wicket:id="defaulthompagewithparams" href="org.apache.wicket.mock.MockHomePage?param1=1&param2=test"></a>
+ <a wicket:id="defaulthompagewithparams" href="org.apache.wicket.mock.MockHomePage?param1=1&amp;param2=test"></a>
<a wicket:id="defaulthompagewithpagemap" href="org.apache.wicket.mock.MockHomePage"></a>
</body>
</html>
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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -22,7 +22,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable
-<a wicket:id="ajaxRefresh" id="ajaxRefresh2" href="#" onclick="var wcall=wicketAjaxGet('../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=wicketAjaxGet('../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>
</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=1053642&r1=1053641&r2=1053642&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 Wed Dec 29 14:36:34 2010
@@ -14,7 +14,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=wicketAjaxGet('../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=wicketAjaxGet('../page?0-1.IBehaviorListener.0-add',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('add2') != null;}.bind(this));return !wcall;">Add</a>
Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_mount_result.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_mount_result.html?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_mount_result.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_mount_result.html Wed Dec 29 14:36:34 2010
@@ -1,5 +1,5 @@
<html>
<body>
-<a href="stateless?0-1.ILinkListener-link&testParam1=testValue1&testParam2=testValue2" wicket:id="link">test</a>
+<a href="stateless?0-1.ILinkListener-link&amp;testParam1=testValue1&amp;testParam2=testValue2" wicket:id="link">test</a>
</body>
</html>
\ No newline at end of file
Modified: wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_result.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_result.html?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_result.html (original)
+++ wicket/trunk/wicket-core/src/test/java/org/apache/wicket/stateless/StatelessComponentPageWithParams_result.html Wed Dec 29 14:36:34 2010
@@ -1,5 +1,5 @@
<html>
<body>
-<a href="org.apache.wicket.stateless.StatelessComponentPageWithParams?0-1.ILinkListener-link&testParam1=testValue1&testParam2=testValue2" wicket:id="link">test</a>
+<a href="org.apache.wicket.stateless.StatelessComponentPageWithParams?0-1.ILinkListener-link&amp;testParam1=testValue1&amp;testParam2=testValue2" wicket:id="link">test</a>
</body>
</html>
\ No newline at end of file
Modified: wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html (original)
+++ wicket/trunk/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html Wed Dec 29 14:36:34 2010
@@ -1,129 +1,129 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Wicket Examples - dates</title>
-<link rel="stylesheet" type="text/css" href="../../style.css"/>
-<style type="text/css">
-th {
- color: grey;
-}
-</style>
-<script type="text/javascript" src="../resource/org.apache.wicket.extensions.yui.YuiLib/yuiloader.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
-<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
-Wicket.Event.add(window, "domready", function(event) { /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-wicketCalendarInits = [];
-wicketCalendarInitFinished = false;
-wicketCalendarI18n = {};
-wicketCalendarAdd = function(initFn) {
- if (wicketCalendarInitFinished) {
- // when a DatePicker is added via ajax, the loader is already finished, so
- // we call the init function directly.
- initFn();
- } else {
- // when page is rendered, all calendar components will be initialized after
- // the required js libraries have been loaded.
- wicketCalendarInits.push(initFn);
- }
-};
-
-var wicketYuiLoader = new YAHOO.util.YUILoader({
- base: "../resource/org.apache.wicket.extensions.yui.YuiLib/",
- filter: "RAW",
- allowRollup: false,
- require: ["wicket-date"],
- onSuccess: function() {
- wicketCalendarInitFinished = true;
- while (wicketCalendarInits.length > 0) {
- wicketCalendarInits.pop()();
- }
- }
-});
-wicketYuiLoader.addModule({
- name: "wicket-date",
- type: "js",
- requires: ["calendar"],
- fullpath: "../resource/org.apache.wicket.extensions.yui.calendar.DatePicker/wicket-date.js"
-});
-wicketYuiLoader.insert();
-;});
-/*-->]]>*/</script>
-<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
-Wicket.Event.add(window, "domready", function(event) { wicketCalendarI18n["de"]={MONTHS_SHORT:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],MONTHS_LONG:["Januar","Februar","M\u00E4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],WEEKDAYS_MEDIUM:["So","Mo","Di","Mi","Do","Fr","Sa"],WEEKDAYS_LONG:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],START_WEEKDAY:1,WEEKDAYS_1CHAR:["S","M","D","M","D","F","S"],WEEKDAYS_SHORT:["So","Mo","Di","Mi","Do","Fr","Sa"]};;});
-/*-->]]>*/</script>
-<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
-Wicket.Event.add(window, "domready", function(event) { /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-wicketCalendarAdd(function() {
- Wicket.DateTime.init2("dateTextField1", "dateTextField1", {close:true,selected:"xx.xx.xxxx",pagedate:"xx.xxxx"}, "dd.MM.yy",
- true, true, true, false, wicketCalendarI18n["de"]);
-
-});
-;});
-/*-->]]>*/</script>
-</head>
-<body>
-<form wicket:id="localeForm" id="localeForm2" method="post" action="../page?0-1.IFormSubmitListener-localeForm"><div style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input type="hidden" name="localeForm2_hf_0" id="localeForm2_hf_0" /></div>
-<p><select wicket:id="localeSelect" onchange="document.getElementById('localeForm2_hf_0').value='page?0-1.IOnChangeListener-localeForm-localeSelect';document.getElementById('localeForm2').submit();" name="localeSelect">
-<option value="0">Chinesisch (China) (Chinese (China))</option>
-<option value="1">Chinesisch (China) (Chinese (China))</option>
-<option value="2">Chinesisch (China) (Chinese (China))</option>
-<option value="3">Chinesisch (Taiwan) (Chinese (Taiwan))</option>
-<option value="4">Chinesisch (Taiwan) (Chinese (Taiwan))</option>
-<option selected="selected" value="5">Deutsch (German)</option>
-<option value="6">Deutsch (Deutschland) (German (Germany))</option>
-<option value="7">Englisch (English)</option>
-<option value="8">Englisch (Kanada) (English (Canada))</option>
-<option value="9">Englisch (Vereinigte Staaten von Amerika) (English (United States))</option>
-<option value="10">Englisch (Vereinigtes Königreich) (English (United Kingdom))</option>
-<option value="11">Französisch (French)</option>
-<option value="12">Französisch (Frankreich) (French (France))</option>
-<option value="13">Französisch (Kanada) (French (Canada))</option>
-<option value="14">Italienisch (Italian)</option>
-<option value="15">Italienisch (Italien) (Italian (Italy))</option>
-<option value="16">Japanisch (Japanese)</option>
-<option value="17">Japanisch (Japan) (Japanese (Japan))</option>
-<option value="18">Koreanisch (Korean)</option>
-<option value="19">Koreanisch (Südkorea) (Korean (South Korea))</option>
-</select> [<a href="../page?0-1.ILinkListener-localeForm-localeUSLink" wicket:id="localeUSLink">set to english</a>]</p>
-</form>
-<p>
-<form wicket:id="form" id="form3" 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="form3_hf_0" id="form3_hf_0" /></div><input type="text" wicket:id="dateTextField" value="xx.xx.xx" name="dateTextField" id="dateTextField1"/>
-<span class="yui-skin-sam"> <span style="display:none;position:absolute;z-index: 99999;" id="dateTextField1Dp"></span><img style="cursor: pointer; border: none;" id="dateTextField1Icon" src="../resource/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif" alt="" title=""/></span> <input type="submit" value="submit" /></form>
-</p>
-<p>
- <div wicket:id="feedback"><wicket:panel>
-
-</wicket:panel></div>
-</p>
-</body>
-</html>
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Wicket Examples - dates</title>
+<link rel="stylesheet" type="text/css" href="../../style.css"/>
+<style type="text/css">
+th {
+ color: grey;
+}
+</style>
+<script type="text/javascript" src="../resource/org.apache.wicket.extensions.yui.YuiLib/yuiloader.js"></script>
+<script type="text/javascript" src="../resource/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
+<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
+Wicket.Event.add(window, "domready", function(event) { /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+wicketCalendarInits = [];
+wicketCalendarInitFinished = false;
+wicketCalendarI18n = {};
+wicketCalendarAdd = function(initFn) {
+ if (wicketCalendarInitFinished) {
+ // when a DatePicker is added via ajax, the loader is already finished, so
+ // we call the init function directly.
+ initFn();
+ } else {
+ // when page is rendered, all calendar components will be initialized after
+ // the required js libraries have been loaded.
+ wicketCalendarInits.push(initFn);
+ }
+};
+
+var wicketYuiLoader = new YAHOO.util.YUILoader({
+ base: "../resource/org.apache.wicket.extensions.yui.YuiLib/",
+ filter: "RAW",
+ allowRollup: false,
+ require: ["wicket-date"],
+ onSuccess: function() {
+ wicketCalendarInitFinished = true;
+ while (wicketCalendarInits.length > 0) {
+ wicketCalendarInits.pop()();
+ }
+ }
+});
+wicketYuiLoader.addModule({
+ name: "wicket-date",
+ type: "js",
+ requires: ["calendar"],
+ fullpath: "../resource/org.apache.wicket.extensions.yui.calendar.DatePicker/wicket-date.js"
+});
+wicketYuiLoader.insert();
+;});
+/*-->]]>*/</script>
+<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
+Wicket.Event.add(window, "domready", function(event) { wicketCalendarI18n["de"]={MONTHS_SHORT:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],MONTHS_LONG:["Januar","Februar","M\u00E4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],WEEKDAYS_MEDIUM:["So","Mo","Di","Mi","Do","Fr","Sa"],WEEKDAYS_LONG:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],START_WEEKDAY:1,WEEKDAYS_1CHAR:["S","M","D","M","D","F","S"],WEEKDAYS_SHORT:["So","Mo","Di","Mi","Do","Fr","Sa"]};;});
+/*-->]]>*/</script>
+<script type="text/javascript" ><!--/*--><![CDATA[/*><!--*/
+Wicket.Event.add(window, "domready", function(event) { /*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+wicketCalendarAdd(function() {
+ Wicket.DateTime.init2("dateTextField1", "dateTextField1", {close:true,selected:"xx.xx.xxxx",pagedate:"xx.xxxx"}, "dd.MM.yy",
+ true, true, true, false, wicketCalendarI18n["de"]);
+
+});
+;});
+/*-->]]>*/</script>
+</head>
+<body>
+<form wicket:id="localeForm" id="localeForm2" method="post" action="../page?0-1.IFormSubmitListener-localeForm"><div style="width:0px;height:0px;position:absolute;left:-100px;top:-100px;overflow:hidden"><input type="hidden" name="localeForm2_hf_0" id="localeForm2_hf_0" /></div>
+<p><select wicket:id="localeSelect" onchange="document.getElementById('localeForm2_hf_0').value='page?0-1.IOnChangeListener-localeForm-localeSelect';document.getElementById('localeForm2').submit();" name="localeSelect">
+<option value="0">Chinesisch (China) (Chinese (China))</option>
+<option value="1">Chinesisch (China) (Chinese (China))</option>
+<option value="2">Chinesisch (China) (Chinese (China))</option>
+<option value="3">Chinesisch (Taiwan) (Chinese (Taiwan))</option>
+<option value="4">Chinesisch (Taiwan) (Chinese (Taiwan))</option>
+<option selected="selected" value="5">Deutsch (German)</option>
+<option value="6">Deutsch (Deutschland) (German (Germany))</option>
+<option value="7">Englisch (English)</option>
+<option value="8">Englisch (Kanada) (English (Canada))</option>
+<option value="9">Englisch (Vereinigte Staaten von Amerika) (English (United States))</option>
+<option value="10">Englisch (Vereinigtes Königreich) (English (United Kingdom))</option>
+<option value="11">Französisch (French)</option>
+<option value="12">Französisch (Frankreich) (French (France))</option>
+<option value="13">Französisch (Kanada) (French (Canada))</option>
+<option value="14">Italienisch (Italian)</option>
+<option value="15">Italienisch (Italien) (Italian (Italy))</option>
+<option value="16">Japanisch (Japanese)</option>
+<option value="17">Japanisch (Japan) (Japanese (Japan))</option>
+<option value="18">Koreanisch (Korean)</option>
+<option value="19">Koreanisch (Südkorea) (Korean (South Korea))</option>
+</select> [<a href="../page?0-1.ILinkListener-localeForm-localeUSLink" wicket:id="localeUSLink">set to english</a>]</p>
+</form>
+<p>
+<form wicket:id="form" id="form3" 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="form3_hf_0" id="form3_hf_0" /></div><input type="text" wicket:id="dateTextField" value="xx.xx.xx" name="dateTextField" id="dateTextField1"/>
+<span class="yui-skin-sam"> <span style="display:none;position:absolute;z-index: 99999;" id="dateTextField1Dp"></span><img style="cursor: pointer; border: none;" id="dateTextField1Icon" src="../resource/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif" alt="" title=""/></span> <input type="submit" value="submit" /></form>
+</p>
+<p>
+ <div wicket:id="feedback"><wicket:panel>
+
+</wicket:panel></div>
+</p>
+</body>
+</html>
Modified: wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java?rev=1053642&r1=1053641&r2=1053642&view=diff
==============================================================================
--- wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java (original)
+++ wicket/trunk/wicket-util/src/main/java/org/apache/wicket/util/string/Strings.java Wed Dec 29 14:36:34 2010
@@ -246,11 +246,11 @@ public final class Strings
* non-breaking space entities (<nbsp>).
*
* @param s
- * The string to escape
+ * The characters to escape
* @see Strings#escapeMarkup(String, boolean)
* @return The escaped string
*/
- public static CharSequence escapeMarkup(final String s)
+ public static CharSequence escapeMarkup(final CharSequence s)
{
return escapeMarkup(s, false);
}
@@ -262,12 +262,12 @@ public final class Strings
* converted to &lt; entities and greater than signs to &gt; entities.
*
* @param s
- * The string to escape
+ * The characters to escape
* @param escapeSpaces
* True to replace ' ' with nonbreaking space
* @return The escaped string
*/
- public static CharSequence escapeMarkup(final String s, final boolean escapeSpaces)
+ public static CharSequence escapeMarkup(final CharSequence s, final boolean escapeSpaces)
{
return escapeMarkup(s, escapeSpaces, false);
}
@@ -279,14 +279,14 @@ public final class Strings
* converted to &lt; entities and greater than signs to &gt; entities.
*
* @param s
- * The string to escape
+ * The characters to escape
* @param escapeSpaces
* True to replace ' ' with nonbreaking space
* @param convertToHtmlUnicodeEscapes
* True to convert non-7 bit characters to unicode HTML (&#...)
* @return The escaped string
*/
- public static CharSequence escapeMarkup(final String s, final boolean escapeSpaces,
+ public static CharSequence escapeMarkup(final CharSequence s, final boolean escapeSpaces,
final boolean convertToHtmlUnicodeEscapes)
{
if (s == null)