[CONF] Apache Wicket Migration to Wicket 6.0

2011-11-18 Thread confluence







Migration to Wicket 6.0
Page edited by Martin Grigorov


Comment:
Add an entry for the usage of JQuery


 Changes (1)
 




...
* Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors  
h3. Ajax  h4. Use JQuery as a backing library for Wicket Ajax functionality  Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that. For more information read ...  
h3. List of renamed classes and methods  
...


Full Content

Migrating to Wicket 6.0

Environment


	Wicket 6.0 requires at least Java 6




Repeaters

	`IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175).



Form Processing

Validation


	`DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead
	`StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead
	`StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag
	`AbstractValidator` has been removed
	`ValidationError` now makes creating standard error keys (classname and classname.subtype) easier
	Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors



Ajax

Use JQuery as a backing library for Wicket Ajax functionality

Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that.
For more information read ...

List of renamed classes and methods

Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6.

Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6.




 Wicket 1.5 (deprecated) 
 Wicket 6 (replacement) 


 org.apache.wicket.behavior.SimpleAttributeModifier 
 org.apache.wicket.AttributeModifier#replace(...) 


 org.apache.wicket.request.Url#toAbsoluteString() 
 org.apache.wicket.request.Url#toString(StringMode.FULL) 







Change Notification Preferences

View Online
|
View Changes
|
Add Comment









[CONF] Apache Wicket Wicket 6.0

2011-11-18 Thread confluence







Wicket 6.0
Page  added by Martin Grigorov

 

 This is a parent page for all bigger changes in Wicket 6.0 


   
Change Notification Preferences
   
   View Online
  |
   Add Comment
   








[CONF] Apache Wicket Wicket Ajax

2011-11-18 Thread confluence







Wicket Ajax
Page  added by Martin Grigorov

 

 What ?

Since version 6.0 Wicket uses JQuery as a backing library for its Ajax functionality.

Why ?

The previous implementations of wicket-ajax.js and wicket-event.js were home baked solutions that worked well but also suffered from the differences in the browsers. Often users complained that some functionality doesn't work on particular version of particular browser. That's why the Wicket team chose to use JQuery to deal with browser inconsistencies and leave us to do our business logic.

Design and implementation

The new implementations (wicket-ajax-jquery.js and wicket-event-jquery.js) use JQuery internally but expose Wicket.** API similar to the previous version. 

All Java components and behaviors should still use the Wicket.** API. This way if someday we decide to not use JQuery anymore we will have less work to do. Also if a user uses Dojo/YUI/ExtJS/... and prefer to not have JQuery in her application then she will be able to provide wicket-ajax-xyz.js implementation and replace the default one.

Table with renamed methods from the previous version




 1.5 
 6.0 


 Wicket.fixEvent 
 Wicket.Event.fix 


 Wicket.stopEvent 
 Wicket.Event.stop 


 Wicket.show   
 Wicket.DOM.show 


 Wicket.showIncrementally   
 Wicket.DOM.showIncrementally 


 Wicket.hide  
 Wicket.DOM.hide 


 Wicket.hideIncrementally  
 Wicket.DOM.hideIncrementally 


 Wicket.decode  
 Wicket.Head.Contributor.decode 


 Wicket.ajaxGet  
 Wicket.Ajax.get 


 Wicket.ajaxPost  
 Wicket.Ajax.post 


 Wicket.submitForm  
 Wicket.Ajax.submitForm 


 Wicket.submitFormById  
 Wicket.Ajax.submitFormById 


 Wicket.replaceOuterHtml 
 Wicket.DOM.replace 


 Wicket.Form.doSerialize 
 Wicket.Form.serializeForm 






Link to jsdoc

TODO

Configuration

To replace any of the _javascript_ files the user application may use:

MyApplication#init():


public void init() {
  super.init();

  // this is the reference to JQuery
  getAjaxSettings().setBackingLibraryReference(new _javascript_ResourceReference());
  
  // wicket-event.js
  getAjaxSettings().setWicketEventReference(new _javascript_ResourceReference());

  // wicket-ajax.js
  getAjaxSettings().setWicketAjaxReference(new _javascript_ResourceReference());

}



This way the user application can upgrade/downgrade to new/old version of JQuery or even use YUI as backing library with the respective implementations of wicket-ajax and wicket-event based on YUI.



   
Change Notification Preferences
   
   View Online
  |
   Add Comment
   








[CONF] Apache Wicket Wicket Ajax

2011-11-18 Thread confluence







Wicket Ajax
Page  added by Martin Grigorov

 

 What ?

Since version 6.0 Wicket uses JQuery as a backing library for its Ajax functionality.

Why ?

The previous implementations of wicket-ajax.js and wicket-event.js were home baked solutions that worked well but also suffered from the differences in the browsers. Often users complained that some functionality doesn't work on particular version of particular browser. That's why the Wicket team chose to use JQuery to deal with browser inconsistencies and leave us to do our business logic.

Design and implementation

The new implementations (wicket-ajax-jquery.js and wicket-event-jquery.js) use JQuery internally but expose Wicket.** API similar to the previous version. 

All Java components and behaviors should still use the Wicket.** API. This way if someday we decide to not use JQuery anymore we will have less work to do. Also if a user uses Dojo/YUI/ExtJS/... and prefer to not have JQuery in her application then she will be able to provide wicket-ajax-xyz.js implementation and replace the default one.

Table with renamed methods from the previous version




 1.5 
 6.0 


 Wicket.fixEvent 
 Wicket.Event.fix 


 Wicket.stopEvent 
 Wicket.Event.stop 


 Wicket.show   
 Wicket.DOM.show 


 Wicket.showIncrementally   
 Wicket.DOM.showIncrementally 


 Wicket.hide  
 Wicket.DOM.hide 


 Wicket.hideIncrementally  
 Wicket.DOM.hideIncrementally 


 Wicket.decode  
 Wicket.Head.Contributor.decode 


 Wicket.ajaxGet, wicketAjaxGet  
 Wicket.Ajax.get 


 Wicket.ajaxPost, wicketAjaxPost  
 Wicket.Ajax.post 


 Wicket.submitForm  
 Wicket.Ajax.submitForm 


 Wicket.submitFormById  
 Wicket.Ajax.submitForm 


 Wicket.replaceOuterHtml 
 Wicket.DOM.replace 


 Wicket.Form.doSerialize 
 Wicket.Form.serializeForm 






Link to jsdoc

TODO

Configuration

To replace any of the _javascript_ files the user application may use:

MyApplication#init():


public void init() {
  super.init();

  // this is the reference to JQuery
  getAjaxSettings().setBackingLibraryReference(new _javascript_ResourceReference());
  
  // wicket-event.js
  getAjaxSettings().setWicketEventReference(new _javascript_ResourceReference());

  // wicket-ajax.js
  getAjaxSettings().setWicketAjaxReference(new _javascript_ResourceReference());

}



This way the user application can upgrade/downgrade to new/old version of JQuery or even use YUI as backing library with the respective implementations of wicket-ajax and wicket-event based on YUI.



   
Change Notification Preferences
   
   View Online
  |
   Add Comment
   








[CONF] Apache Wicket Wicket Ajax

2011-11-18 Thread confluence







Wicket Ajax
Page  added by Martin Grigorov

 

 What ?

Since version 6.0 Wicket uses JQuery as a backing library for its Ajax functionality.

Why ?

The previous implementations of wicket-ajax.js and wicket-event.js were home baked solutions that worked well but also suffered from the differences in the browsers. Often users complained that some functionality doesn't work on particular version of particular browser. That's why the Wicket team chose to use JQuery to deal with browser inconsistencies and leave us to do our business logic.

Design and implementation

The new implementations (wicket-ajax-jquery.js and wicket-event-jquery.js) use JQuery internally but expose Wicket.** API similar to the previous version. 

All Java components and behaviors should still use the Wicket.** API. This way if someday we decide to not use JQuery anymore we will have less work to do. Also if a user uses Dojo/YUI/ExtJS/... and prefer to not have JQuery in her application then she will be able to provide wicket-ajax-xyz.js implementation and replace the default one.

Table with renamed methods from the previous version




 1.5 
 6.0 


 Wicket.fixEvent 
 Wicket.Event.fix 


 Wicket.stopEvent 
 Wicket.Event.stop 


 Wicket.show   
 Wicket.DOM.show 


 Wicket.showIncrementally   
 Wicket.DOM.showIncrementally 


 Wicket.hide  
 Wicket.DOM.hide 


 Wicket.hideIncrementally  
 Wicket.DOM.hideIncrementally 


 Wicket.decode  
 Wicket.Head.Contributor.decode 


 Wicket.ajaxGet  
 Wicket.Ajax.get 


 Wicket.ajaxPost  
 Wicket.Ajax.post 


 Wicket.submitForm  
 Wicket.Ajax.submitForm 


 Wicket.submitFormById  
 Wicket.Ajax.submitFormById 


 Wicket.replaceOuterHtml 
 Wicket.DOM.replace 


 Wicket.Form.doSerialize 
 Wicket.Form.serializeForm 






Link to jsdoc

TODO

Configuration

To replace any of the _javascript_ files the user application may use:

MyApplication#init():


public void init() {
  super.init();

  // this is the reference to JQuery
  getAjaxSettings().setBackingLibraryReference(new _javascript_ResourceReference());
  
  // wicket-event.js
  getAjaxSettings().setWicketEventReference(new _javascript_ResourceReference());

  // wicket-ajax.js
  getAjaxSettings().setWicketAjaxReference(new _javascript_ResourceReference());

}



This way the user application can upgrade/downgrade to new/old version of JQuery or even use YUI as backing library with the respective implementations of wicket-ajax and wicket-event based on YUI.



   
Change Notification Preferences
   
   View Online
  |
   Add Comment
   








[jira] [Created] (WICKET-4241) Modal Window respond 404 with Internet Explorer.

2011-11-18 Thread Masaya Seko (Created) (JIRA)
Modal Window respond 404 with Internet Explorer.


 Key: WICKET-4241
 URL: https://issues.apache.org/jira/browse/WICKET-4241
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.5.3
 Environment: Internet Explorer (IE)
Reporter: Masaya Seko


Modal Window respond 404 with Internet Explorer.
Stack trace is displayed on the console.
This issue does not occur in chrome.

the stack trace below.
WARN  - WicketObjects  - Could not resolve class [wicket]
java.lang.ClassNotFoundException: wicket
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at 
org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
at 
org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68)
at 
org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138)
at 
org.apache.wicket.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
at 
org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263)
at 
org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:130)
at 
org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:595)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (WICKET-4241) Modal Window respond 404 with Internet Explorer.

2011-11-18 Thread Masaya Seko (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Masaya Seko updated WICKET-4241:


Attachment: WICKET-4241.zip

quickstart

 Modal Window respond 404 with Internet Explorer.
 

 Key: WICKET-4241
 URL: https://issues.apache.org/jira/browse/WICKET-4241
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.5.3
 Environment: Internet Explorer (IE)
Reporter: Masaya Seko
 Attachments: WICKET-4241.zip


 Modal Window respond 404 with Internet Explorer.
 Stack trace is displayed on the console.
 This issue does not occur in chrome.
 the stack trace below.
 WARN  - WicketObjects  - Could not resolve class [wicket]
 java.lang.ClassNotFoundException: wicket
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:242)
 at 
 org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
 at 
 org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68)
 at 
 org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138)
 at 
 org.apache.wicket.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
 at 
 org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263)
 at 
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:130)
 at 
 org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:595)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (WICKET-4241) Modal Window respond 404 with Internet Explorer.

2011-11-18 Thread Masaya Seko (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152745#comment-13152745
 ] 

Masaya Seko edited comment on WICKET-4241 at 11/18/11 9:42 AM:
---

attach quickstart

  was (Author: m_seko):
quickstart
  
 Modal Window respond 404 with Internet Explorer.
 

 Key: WICKET-4241
 URL: https://issues.apache.org/jira/browse/WICKET-4241
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.5.3
 Environment: Internet Explorer (IE)
Reporter: Masaya Seko
 Attachments: WICKET-4241.zip


 Modal Window respond 404 with Internet Explorer.
 Stack trace is displayed on the console.
 This issue does not occur in chrome.
 the stack trace below.
 WARN  - WicketObjects  - Could not resolve class [wicket]
 java.lang.ClassNotFoundException: wicket
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:242)
 at 
 org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
 at 
 org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68)
 at 
 org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138)
 at 
 org.apache.wicket.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
 at 
 org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263)
 at 
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:130)
 at 
 org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:595)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1203565 - in /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js: wicket-ajax-jquery.js wicket-event-jquery.js

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 10:03:31 2011
New Revision: 1203565

URL: http://svn.apache.org/viewvc?rev=1203565view=rev
Log:
WICKET-4236 Use JQuery as a backing library for Wicket's JavaScript code

Replace the usage of Function.bind with jQuery.proxy()


Modified:

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/ajax/res/js/wicket-event-jquery.js

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=1203565r1=1203564r2=1203565view=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
 Fri Nov 18 10:03:31 2011
@@ -36,15 +36,6 @@ jQuery.noConflict();
return;
}
 
-   if (typeof(Function.prototype.bind) === 'undefined') {
-   Function.prototype.bind = function (object) {
-   var self = this;
-   return function () {
-   return self.apply(object, arguments);
-   };
-   };
-   }
-
/**
 * Add a check for old Safari. It should not be our responsibility to 
check the
 * browser's version, but it's a minor version that makes a difference 
here,
@@ -128,13 +119,14 @@ jQuery.noConflict();
f = this.functions[this.current];
run = function () {
try {
-   f(this.notify.bind(this));
+   f(jQuery.proxy(this.notify, 
this));
}
catch (e) {

Wicket.Log.error(FunctionsExecuter.processNext:  + e);
-   this.notify.bind(this);
+   jQuery.proxy(this.notify, this);
}
-   }.bind(this);
+   };
+   run = jQuery.proxy(run, this);
this.current++;
 
if (this.depth  50 || Wicket.Browser.isKHTML() 
|| Wicket.Browser.isSafari()) {
@@ -353,7 +345,7 @@ jQuery.noConflict();
// Executes a get request
get: function () {
if (this.channel !== null) {
-   var res = 
Wicket.channelManager.schedule(this.channel, this.doGet.bind(this));
+   var res = 
Wicket.channelManager.schedule(this.channel, jQuery.proxy(this.doGet, this));
return res !== null ? res : true;
} else {
return this.doGet();
@@ -375,7 +367,7 @@ jQuery.noConflict();
t = this.transport;
if (t !== null) {
t.open(GET, url, this.async);
-   t.onreadystatechange = 
this.stateChangeCallback.bind(this);
+   t.onreadystatechange = 
jQuery.proxy(this.stateChangeCallback, this);
// set a special flag to allow server 
distinguish between ajax and non-ajax requests
t.setRequestHeader(Wicket-Ajax, 
true);

t.setRequestHeader(Wicket-Ajax-BaseURL, getAjaxBaseUrl());
@@ -399,9 +391,9 @@ jQuery.noConflict();
// Posts the given string
post: function (body) {
if (this.channel !== null) {
-   var res = 
Wicket.channelManager.schedule(this.channel, function () {
+   var res = 
Wicket.channelManager.schedule(this.channel, jQuery.proxy(function () {
this.doPost(body);
-   }.bind(this));
+   }, this));
return res !== null ? res: true;
} else {
return this.doPost(body);
@@ -429,7 +421,7 @@ jQuery.noConflict();
body = body();
}
t.open(POST, url, this.async);
-   t.onreadystatechange = 

svn commit: r1203567 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/Application.java

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 10:14:13 2011
New Revision: 1203567

URL: http://svn.apache.org/viewvc?rev=1203567view=rev
Log:
WICKET-4114 Mark getRequestCycleProvider in Application final


Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/Application.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/Application.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/Application.java?rev=1203567r1=1203566r2=1203567view=diff
==
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/Application.java 
(original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/Application.java 
Fri Nov 18 10:14:13 2011
@@ -1565,7 +1565,7 @@ public abstract class Application implem
 * 
 * @return RequestCycleProvider
 */
-   public IRequestCycleProvider getRequestCycleProvider()
+   public final IRequestCycleProvider getRequestCycleProvider()
{
return requestCycleProvider;
}
@@ -1574,7 +1574,7 @@ public abstract class Application implem
 * 
 * @param requestCycleProvider
 */
-   public void setRequestCycleProvider(final IRequestCycleProvider 
requestCycleProvider)
+   public final void setRequestCycleProvider(final IRequestCycleProvider 
requestCycleProvider)
{
this.requestCycleProvider = requestCycleProvider;
}
@@ -1644,7 +1644,8 @@ public abstract class Application implem
 * @param headerResponseDecorator
 *your custom decorator
 */
-   public void setHeaderResponseDecorator(final IHeaderResponseDecorator 
headerResponseDecorator)
+   public final void setHeaderResponseDecorator(
+   final IHeaderResponseDecorator headerResponseDecorator)
{
this.headerResponseDecorator = headerResponseDecorator;
}




[jira] [Resolved] (WICKET-4114) Mark getRequestCycleProvider in Application final

2011-11-18 Thread Martin Grigorov (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-4114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-4114.
-

Resolution: Fixed
  Assignee: Martin Grigorov

 Mark getRequestCycleProvider in Application final
 -

 Key: WICKET-4114
 URL: https://issues.apache.org/jira/browse/WICKET-4114
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.5.1
Reporter: Martin Dilger
Assignee: Martin Grigorov
 Fix For: 1.6.0

 Attachments: 
 0001-WICKET-4114-Mark-getRequestCycleProvider-as-final.patch


 A Developer should not be able to override getRequestCycleProvider, as this 
 breaks some Functionality in BaseWicketTester, and to find out what goes 
 wrong can be timeconsuming and can cause headaches.
 BaseWicketTester does the following:
 application.setRequestCycleProvider(new TestRequestCycleProvider(
   application.getRequestCycleProvider()));
 TestRequestCycleProvider provides the ability to force a certain 
 RequestHandler (for example to Render a page used for 
 BaseWicketTester#startPage, 
 this ignores the normal Process to resolve a RequestHandler.
 If you override Application#getRequestCycleProvider, the Test will fail as 
 Wicket will resolve the last RequestMapper in the Chain which is typically 
 the HomePageMapper.
 You Test will fail, and you might have real problems to find out whats going 
 on, as I had last night.
 Therefore I strongly recommend to mark #getRequestCycleProvider final. A 
 developer has still the possibility to set a RequestCycleProvider with 
 #setRequestCycleProvider, so we do not lose anything here.
 Thanks
 Martin Dilger

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1203570 - in /wicket/trunk/wicket-core/src: main/java/org/apache/wicket/resource/loader/ test/java/org/apache/wicket/resource/loader/ test/java/org/apache/wicket/resource/loader/pages/

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 10:21:13 2011
New Revision: 1203570

URL: http://svn.apache.org/viewvc?rev=1203570view=rev
Log:
WICKET-4211 package.properties should be prefixed with wicket- namespace


Added:

wicket/trunk/wicket-core/src/test/java/org/apache/wicket/resource/loader/pages/wicket-package.properties
  - copied unchanged from r1203560, 
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/resource/loader/pages/package.properties

wicket/trunk/wicket-core/src/test/java/org/apache/wicket/resource/loader/wicket-package.properties
  - copied unchanged from r1203560, 
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/resource/loader/package.properties
Removed:

wicket/trunk/wicket-core/src/test/java/org/apache/wicket/resource/loader/package.properties

wicket/trunk/wicket-core/src/test/java/org/apache/wicket/resource/loader/pages/package.properties
Modified:

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/resource/loader/PackageStringResourceLoader.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/resource/loader/PackageStringResourceLoader.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/resource/loader/PackageStringResourceLoader.java?rev=1203570r1=1203569r2=1203570view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/resource/loader/PackageStringResourceLoader.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/resource/loader/PackageStringResourceLoader.java
 Fri Nov 18 10:21:13 2011
@@ -49,7 +49,7 @@ public class PackageStringResourceLoader
private static final Logger log = 
LoggerFactory.getLogger(PackageStringResourceLoader.class);
 
/** The name (without extension) of the properties file */
-   private String filename = package;
+   private String filename = wicket-package;
 
/**
 * Create and initialize the resource loader.




[jira] [Resolved] (WICKET-4211) package.properties should be prefixed with wicket- namespace

2011-11-18 Thread Martin Grigorov (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-4211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-4211.
-

Resolution: Fixed
  Assignee: Martin Grigorov

 package.properties should be prefixed with wicket- namespace
 --

 Key: WICKET-4211
 URL: https://issues.apache.org/jira/browse/WICKET-4211
 Project: Wicket
  Issue Type: Task
  Components: wicket
Affects Versions: 1.5.2
Reporter: Sven Meier
Assignee: Martin Grigorov
Priority: Minor
 Fix For: 1.6.0


 To avoid name collisions, PackageStringResourceLoader should use 
 wicket-package as file name. This requires all existing 
 package*.properties file to be renamed to wicket-package*.properties.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[CONF] Apache Wicket Migration to Wicket 6.0

2011-11-18 Thread confluence







Migration to Wicket 6.0
Page edited by Martin Grigorov


 Changes (1)
 




...
For more information read https://cwiki.apache.org/confluence/x/NK2oAQ  
h3. package.properties renamed to wicket-package.properties  The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See [WICKET-4211|https://issues.apache.org/jira/browse/WICKET-4211]   
h3. List of renamed classes and methods  
...


Full Content

Migrating to Wicket 6.0

Environment


	Wicket 6.0 requires at least Java 6




Repeaters

	`IDataProvider` was converted to using `long` instead of `int` to better line up with JPA and other persistence frameworks. This has caused a rather large cascade of `int` to `long` changes all over the repeater packages (WICKET-1175).



Form Processing

Validation


	`DateValidator` no longer has static factory methods, use `new DateValidator(min,max)` instead
	`StringValidator` no longer has static factory methods, use `new StringValidator(min, max)` instead
	`StringValidator` will add the `maxlen` attribute if added to a component attached to an input tag
	`AbstractValidator` has been removed
	`ValidationError` now makes creating standard error keys (classname and classname.subtype) easier
	Most validators provide a `decorate(ValidationError, Validatable)` method for overriding how they report errors



Ajax

Use JQuery as a backing library for Wicket Ajax functionality

Apache Wicket needed to improve the implementation of its _javascript_ libraries used for Ajax functionality (wicket-ajax.js and wicket-event.js) by using any of the bigger _javascript_ libraries and delegate to it the handling of the differences in the browsers (DOM, events, Ajax, ...). After a discussion in the mailing lists the Wicket team decided to use JQuery for that.
For more information read https://cwiki.apache.org/confluence/x/NK2oAQ

package.properties renamed to wicket-package.properties

The special resource bundle that can contain resources for a whole package has been renamed from package.properties to wicket-package.properties. This prefix will be used for all wicket resources which may collide somehow with resources provided by other frameworks. See WICKET-4211 

List of renamed classes and methods

Following the renames in subclasses is easier if the @Override annotations are present. IDE-s, like Eclipse, can be used to add missing @Override annotations before moving to wicket 6.

Here's a table of deprecated classes andmethods in Wicket 1.5 and the corresponding replacement in Wicket 6.




 Wicket 1.5 (deprecated) 
 Wicket 6 (replacement) 


 org.apache.wicket.behavior.SimpleAttributeModifier 
 org.apache.wicket.AttributeModifier#replace(...) 


 org.apache.wicket.request.Url#toAbsoluteString() 
 org.apache.wicket.request.Url#toString(StringMode.FULL) 







Change Notification Preferences

View Online
|
View Changes
|
Add Comment









[jira] [Resolved] (WICKET-4179) Add IDataStore#canBeAsynchronous() so that DefaultPageManagerProvider can determine whether to wrap it in AsynchronousDataStore

2011-11-18 Thread Martin Grigorov (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-4179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-4179.
-

Resolution: Fixed
  Assignee: Martin Grigorov

 Add IDataStore#canBeAsynchronous() so that DefaultPageManagerProvider can 
 determine whether to wrap it in AsynchronousDataStore
 ---

 Key: WICKET-4179
 URL: https://issues.apache.org/jira/browse/WICKET-4179
 Project: Wicket
  Issue Type: Sub-task
  Components: wicket
Affects Versions: 1.5.2
Reporter: Martin Grigorov
Assignee: Martin Grigorov
 Fix For: 1.6.0


 See the parent ticket for more information.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1203573 - in /wicket/trunk/wicket-core/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/pageStore/ main/java/org/apache/wicket/pageStore/memory/ test/java/org/apache/wicket/v

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 10:32:37 2011
New Revision: 1203573

URL: http://svn.apache.org/viewvc?rev=1203573view=rev
Log:
WICKET-4179 Add IDataStore#canBeAsynchronous() so that 
DefaultPageManagerProvider can determine whether to wrap it in 
AsynchronousDataStore


Modified:

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/DiskDataStore.java

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/IDataStore.java

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java

wicket/trunk/wicket-core/src/test/java/org/apache/wicket/versioning/InMemoryPageStore.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java?rev=1203573r1=1203572r2=1203573view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java
 Fri Nov 18 10:32:37 2011
@@ -55,9 +55,7 @@ public class DefaultPageManagerProvider 
 
IStoreSettings storeSettings = getStoreSettings();
 
-   // TODO Wicket.next: add IDataStore#canWorkAsynchronous() and 
replace the instanceof check
-   // below
-   if (storeSettings.isAsynchronous()  dataStore instanceof 
DiskDataStore)
+   if (dataStore.canBeAsynchronous())
{
int capacity = 
storeSettings.getAsynchronousQueueCapacity();
dataStore = new AsynchronousDataStore(dataStore, 
capacity);

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java?rev=1203573r1=1203572r2=1203573view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java
 Fri Nov 18 10:32:37 2011
@@ -371,4 +371,11 @@ public class AsynchronousDataStore imple
}
}
}
+
+   @Override
+   public final boolean canBeAsynchronous()
+   {
+   // should not wrap in abother AsynchronousDataStore
+   return false;
+   }
 }
\ No newline at end of file

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/DiskDataStore.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/DiskDataStore.java?rev=1203573r1=1203572r2=1203573view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/DiskDataStore.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/DiskDataStore.java
 Fri Nov 18 10:32:37 2011
@@ -508,4 +508,9 @@ public class DiskDataStore implements ID
return sessionFolder;
}
 
+   @Override
+   public boolean canBeAsynchronous()
+   {
+   return true;
+   }
 }

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/IDataStore.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/IDataStore.java?rev=1203573r1=1203572r2=1203573view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/IDataStore.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/IDataStore.java
 Fri Nov 18 10:32:37 2011
@@ -75,4 +75,9 @@ public interface IDataStore
 * @return whether the data store is replicated
 */
boolean isReplicated();
+
+   /**
+* @return whether the implementation can be wrapped in {@link 
AsynchronousDataStore}
+*/
+   boolean canBeAsynchronous();
 }

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/pageStore/memory/HttpSessionDataStore.java?rev=1203573r1=1203572r2=1203573view=diff
==
--- 

svn commit: r1203581 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/repeater/ wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 10:50:59 2011
New Revision: 1203581

URL: http://svn.apache.org/viewvc?rev=1203581view=rev
Log:
WICKET-4035 Allow to set the property type in ISortState


Modified:

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/ContactDataProvider.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/FormPage.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/ISortState.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/ISortStateLocator.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/OrderByLink.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/util/SingleSortState.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/util/SortParam.java

wicket/trunk/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/repeater/data/table/ContactsDatabase.java

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/ContactDataProvider.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/ContactDataProvider.java?rev=1203581r1=1203580r2=1203581view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/ContactDataProvider.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/ContactDataProvider.java
 Fri Nov 18 10:50:59 2011
@@ -44,7 +44,8 @@ public class ContactDataProvider impleme
 */
public IteratorContact iterator(long first, long count)
{
-   return getContactsDB().find(first, count, new 
SortParam(firstName, true)).iterator();
+   return getContactsDB().find(first, count, new 
SortParamString(firstName, true))
+   .iterator();
}
 
/**

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/FormPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/FormPage.java?rev=1203581r1=1203580r2=1203581view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/FormPage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/FormPage.java
 Fri Nov 18 10:50:59 2011
@@ -57,8 +57,10 @@ public class FormPage extends BasePage
protected IteratorIModelContact getItemModels()
{
// for simplicity we only show the first 10 
contacts
-   SortParam sort = new SortParam(firstName, 
true);
-   IteratorContact contacts = 
DatabaseLocator.getDatabase().find(0, 10, sort).iterator();
+   SortParamString sort = new 
SortParamString(firstName, true);
+   IteratorContact contacts = 
DatabaseLocator.getDatabase()
+   .find(0, 10, sort)
+   .iterator();
 
// the iterator returns contact objects, but we 
need it to
// return models, we use this handy adapter 
class to perform

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/ISortState.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/ISortState.java?rev=1203581r1=1203580r2=1203581view=diff
==
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/ISortState.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/ISortState.java
 Fri Nov 18 10:50:59 2011
@@ -22,9 +22,11 @@ import org.apache.wicket.IClusterable;
  * Interface used by OrderByLink to interact with any object that keeps track 
of sorting state
  * 
  * @author Igor Vaynberg (ivaynberg)
+ * @param T
+ *the type of the sort property
  * 
  */
-public interface ISortState extends IClusterable
+public interface ISortStateT extends IClusterable
 {
/**
 * Sets sort order of the property
@@ -34,7 +36,7 @@ public interface ISortState extends IClu
 * @param order
 *sort order
 */
-   public void 

[jira] [Resolved] (WICKET-4035) Allow to set the property type in ISortState

2011-11-18 Thread Martin Grigorov (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-4035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-4035.
-

Resolution: Fixed
  Assignee: Martin Grigorov

Improved with r1203581.
Please check if more generification is needed.

 Allow to set the property type in ISortState
 

 Key: WICKET-4035
 URL: https://issues.apache.org/jira/browse/WICKET-4035
 Project: Wicket
  Issue Type: Improvement
  Components: wicket-extensions
Affects Versions: 1.5-RC7
Reporter: Peter Pastrnak
Assignee: Martin Grigorov
Priority: Minor
 Fix For: 1.6.0


 Currently sort state property can be defined only as a String that seems to 
 be not suitable for use with typesafe query builders like QueryDSL (its most 
 probably the same for JPA 2.0). It might be better to have e.g. 
 ISortStateT, where T would be the type of the property. This way the 
 property could be an Expression instead of a String.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1203591 - in /wicket/trunk/wicket-auth-roles/src: main/java/org/apache/wicket/authroles/authorization/strategies/role/ main/java/org/apache/wicket/authroles/authorization/strategies/role/

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 11:00:08 2011
New Revision: 1203591

URL: http://svn.apache.org/viewvc?rev=1203591view=rev
Log:
WICKET-3974 Wicket-auth annotation always denies access if the deny list is 
empty


Added:

wicket/trunk/wicket-auth-roles/src/test/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategyTest.java
Modified:

wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/AbstractRoleAuthorizationStrategy.java

wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java

wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeAction.java

Modified: 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/AbstractRoleAuthorizationStrategy.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/AbstractRoleAuthorizationStrategy.java?rev=1203591r1=1203590r2=1203591view=diff
==
--- 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/AbstractRoleAuthorizationStrategy.java
 (original)
+++ 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/AbstractRoleAuthorizationStrategy.java
 Fri Nov 18 11:00:08 2011
@@ -17,6 +17,7 @@
 package org.apache.wicket.authroles.authorization.strategies.role;
 
 import org.apache.wicket.authorization.IAuthorizationStrategy;
+import org.apache.wicket.util.lang.Args;
 
 /**
  * Base strategy that uses an instance of
@@ -37,10 +38,7 @@ public abstract class AbstractRoleAuthor
 */
public AbstractRoleAuthorizationStrategy(IRoleCheckingStrategy 
roleCheckingStrategy)
{
-   if (roleCheckingStrategy == null)
-   {
-   throw new 
IllegalArgumentException(roleCheckingStrategy must be not null);
-   }
+   Args.notNull(roleCheckingStrategy, roleCheckingStrategy);
this.roleCheckingStrategy = roleCheckingStrategy;
}
 
@@ -79,11 +77,6 @@ public abstract class AbstractRoleAuthor
return true;
}
 
-   if (roles.size() == 1)
-   {
-   return .equals(roles.iterator().next());
-   }
-
return false;
}
 }

Modified: 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java?rev=1203591r1=1203590r2=1203591view=diff
==
--- 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
 (original)
+++ 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AnnotationsRoleAuthorizationStrategy.java
 Fri Nov 18 11:00:08 2011
@@ -125,13 +125,14 @@ public class AnnotationsRoleAuthorizatio
{
if 
(action.getName().equals(authorizeActionAnnotation.action()))
{
-   if (hasAny(new 
Roles(authorizeActionAnnotation.deny(
+   Roles deniedRoles = new 
Roles(authorizeActionAnnotation.deny());
+   if (isEmpty(deniedRoles) == false  
hasAny(deniedRoles))
{
return false;
}
 
-   Roles roles = new 
Roles(authorizeActionAnnotation.roles());
-   if (!(isEmpty(roles) || hasAny(roles)))
+   Roles acceptedRoles = new 
Roles(authorizeActionAnnotation.roles());
+   if (!(isEmpty(acceptedRoles) || 
hasAny(acceptedRoles)))
{
return false;
}

Modified: 
wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeAction.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-auth-roles/src/main/java/org/apache/wicket/authroles/authorization/strategies/role/annotations/AuthorizeAction.java?rev=1203591r1=1203590r2=1203591view=diff

[jira] [Resolved] (WICKET-3974) Wicket-auth annotation always denies access if the deny list is empty

2011-11-18 Thread Martin Grigorov (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-3974.
-

Resolution: Fixed

 Wicket-auth annotation always denies access if the deny list is empty
 -

 Key: WICKET-3974
 URL: https://issues.apache.org/jira/browse/WICKET-3974
 Project: Wicket
  Issue Type: Bug
  Components: wicket-auth-roles
Affects Versions: 1.4.17
Reporter: Mathieu Marcotte-Gagnon
Assignee: Martin Grigorov
 Fix For: 6.0.0

 Attachments: WICKET-3974.patch, WICKET-3974.patch


 I am developing a web application that uses the wicket-auth framework 1.4.17,
 more specifically the following class :
 org.apache.wicket.authorization.strategies.role.annotations.AnnotationsRoleAuthorizationStrategy
 and I am experiencing an issue that I think might be a bug (but I'm not sure, 
 it might be
 that I'm doing something wrong). I am using an annotation like below :
   @AuthorizeAction(action = ..., roles = ...)
 However I have found that I am always denied access to the page. I have 
 traced the reason
 of the access to the following code, in method check of the above class :
   if (hasAny(new Roles(authorizeActionAnnotation.deny(
   {
   return false;
   }
 The deny list returned by authorizeActionAnnotation.deny() is empty, 
 therefore hasAny
 always returns true, which means that when the deny list is empty you are 
 always denied
 access to the page!
 Maybe it's a feature but it sounds like counter-intuitive to me :) Using the 
 following
 annotation did fix the issue :
   @AuthorizeAction(action = ..., deny=dummyRoleToDeny, roles = ...)
 I posted this on the mailing list and obtained confirmation that this seems 
 to be an incorrect check,
 and not a misunderstanding on my part

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1203596 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java

2011-11-18 Thread pete
Author: pete
Date: Fri Nov 18 11:06:56 2011
New Revision: 1203596

URL: http://svn.apache.org/viewvc?rev=1203596view=rev
Log:
switch from using int to long in IDataProvider and the cascade from that
Issue: WICKET-1175

Modified:

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java?rev=1203596r1=1203595r2=1203596view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractPageableView.java
 Fri Nov 18 11:06:56 2011
@@ -52,7 +52,7 @@ public abstract class AbstractPageableVi
 * Keeps track of the number of items we show per page. The default is 
Integer.MAX_VALUE which
 * effectively disables paging.
 */
-   private int itemsPerPage = Integer.MAX_VALUE;
+   private long itemsPerPage = Long.MAX_VALUE;
 
/**
 * Keeps track of the current page number.
@@ -172,7 +172,7 @@ public abstract class AbstractPageableVi
 * 
 * @param items
 */
-   public final void setItemsPerPage(int items)
+   public final void setItemsPerPage(long items)
{
if (items  1)
{




[jira] [Commented] (WICKET-4241) Modal Window respond 404 with Internet Explorer.

2011-11-18 Thread Andrea Del Bene (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152787#comment-13152787
 ] 

Andrea Del Bene commented on WICKET-4241:
-

Inside modal.js there is this if block:

if(Wicket.Browser.isIELessThan9()){
this.content.contentWindow.location.replace(this.settings.ie8_src);
}else{
this.content.contentWindow.location.replace(this.settings.src);
}

I might be wrong but It seems 'ie8_src' is never initialize. Removing if block 
(leaving just 
'this.content.contentWindow.location.replace(this.settings.src);') seems to fix 
the issue. 

 Modal Window respond 404 with Internet Explorer.
 

 Key: WICKET-4241
 URL: https://issues.apache.org/jira/browse/WICKET-4241
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.5.3
 Environment: Internet Explorer (IE)
Reporter: Masaya Seko
 Attachments: WICKET-4241.zip


 Modal Window respond 404 with Internet Explorer.
 Stack trace is displayed on the console.
 This issue does not occur in chrome.
 the stack trace below.
 WARN  - WicketObjects  - Could not resolve class [wicket]
 java.lang.ClassNotFoundException: wicket
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:242)
 at 
 org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
 at 
 org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68)
 at 
 org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138)
 at 
 org.apache.wicket.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
 at 
 org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263)
 at 
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:130)
 at 
 org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:595)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-4241) Modal Window respond 404 with Internet Explorer.

2011-11-18 Thread Martin Grigorov (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152790#comment-13152790
 ] 

Martin Grigorov commented on WICKET-4241:
-

This has been introduced by a similar ticket in 1.5.2 I think by Pedro.
Use svn blame to find the other ticket and if we find a solution for both 
quickstarts it'll be perfect.

 Modal Window respond 404 with Internet Explorer.
 

 Key: WICKET-4241
 URL: https://issues.apache.org/jira/browse/WICKET-4241
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.5.3
 Environment: Internet Explorer (IE)
Reporter: Masaya Seko
 Attachments: WICKET-4241.zip


 Modal Window respond 404 with Internet Explorer.
 Stack trace is displayed on the console.
 This issue does not occur in chrome.
 the stack trace below.
 WARN  - WicketObjects  - Could not resolve class [wicket]
 java.lang.ClassNotFoundException: wicket
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:242)
 at 
 org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
 at 
 org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68)
 at 
 org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138)
 at 
 org.apache.wicket.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
 at 
 org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263)
 at 
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:130)
 at 
 org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:595)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (WICKET-4241) Modal Window respond 404 with Internet Explorer.

2011-11-18 Thread Andrea Del Bene (Issue Comment Edited) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152787#comment-13152787
 ] 

Andrea Del Bene edited comment on WICKET-4241 at 11/18/11 11:14 AM:


Inside modal.js there is this if block:

if(Wicket.Browser.isIELessThan9()){
this.content.contentWindow.location.replace(this.settings.ie8_src);
}else{
this.content.contentWindow.location.replace(this.settings.src);
}

I might be wrong but It seems that 'ie8_src' is never initialized. Removing if 
block (leaving just 
'this.content.contentWindow.location.replace(this.settings.src);') seems to fix 
the issue. 

  was (Author: bitstorm):
Inside modal.js there is this if block:

if(Wicket.Browser.isIELessThan9()){
this.content.contentWindow.location.replace(this.settings.ie8_src);
}else{
this.content.contentWindow.location.replace(this.settings.src);
}

I might be wrong but It seems 'ie8_src' is never initialize. Removing if block 
(leaving just 
'this.content.contentWindow.location.replace(this.settings.src);') seems to fix 
the issue. 
  
 Modal Window respond 404 with Internet Explorer.
 

 Key: WICKET-4241
 URL: https://issues.apache.org/jira/browse/WICKET-4241
 Project: Wicket
  Issue Type: Bug
  Components: wicket-extensions
Affects Versions: 1.5.3
 Environment: Internet Explorer (IE)
Reporter: Masaya Seko
 Attachments: WICKET-4241.zip


 Modal Window respond 404 with Internet Explorer.
 Stack trace is displayed on the console.
 This issue does not occur in chrome.
 the stack trace below.
 WARN  - WicketObjects  - Could not resolve class [wicket]
 java.lang.ClassNotFoundException: wicket
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
 at 
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:242)
 at 
 org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
 at 
 org.apache.wicket.util.lang.WicketObjects.resolveClass(WicketObjects.java:68)
 at 
 org.apache.wicket.request.mapper.AbstractComponentMapper.getPageClass(AbstractComponentMapper.java:138)
 at 
 org.apache.wicket.request.mapper.BookmarkableMapper.parseRequest(BookmarkableMapper.java:110)
 at 
 org.apache.wicket.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:263)
 at 
 org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:130)
 at 
 org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
 at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
 at 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Thread.java:595)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1203602 - in /wicket/trunk: wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/ wicket-examples/src/main/java/org/apache/wicket/examples/repeater/ wicket-extensions/src/main

2011-11-18 Thread pete
Author: pete
Date: Fri Nov 18 11:16:28 2011
New Revision: 1203602

URL: http://svn.apache.org/viewvc?rev=1203602view=rev
Log:
switch from using int to long in IDataProvider and the cascade from that
Issue: WICKET-1175

Modified:

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/DataView.java

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/GridView.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/OIRPage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/PagingPage.java

wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/SortingPage.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/DataView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/DataView.java?rev=1203602r1=1203601r2=1203602view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/DataView.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/DataView.java
 Fri Nov 18 11:16:28 2011
@@ -89,7 +89,7 @@ public abstract class DataViewT extend
 * @param itemsPerPage
 *items per page
 */
-   protected DataView(String id, IDataProviderT dataProvider, int 
itemsPerPage)
+   protected DataView(String id, IDataProviderT dataProvider, long 
itemsPerPage)
{
super(id, dataProvider);
setItemsPerPage(itemsPerPage);

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/GridView.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/GridView.java?rev=1203602r1=1203601r2=1203602view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/GridView.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/repeater/data/GridView.java
 Fri Nov 18 11:16:28 2011
@@ -147,7 +147,7 @@ public abstract class GridViewT extend
 
private void updateItemsPerPage()
{
-   int items = Integer.MAX_VALUE;
+   long items = Long.MAX_VALUE;
 
long result = (long)rows * (long)columns;
 

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/OIRPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/OIRPage.java?rev=1203602r1=1203601r2=1203602view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/OIRPage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/OIRPage.java
 Fri Nov 18 11:16:28 2011
@@ -126,7 +126,7 @@ public class OIRPage extends BasePage
}
};
 
-   dataView.setItemsPerPage(8);
+   dataView.setItemsPerPage(8L);

dataView.setItemReuseStrategy(ReuseIfModelsEqualStrategy.getInstance());
 
add(new OrderByBorder(orderByFirstName, firstName, dp)

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/PagingPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/PagingPage.java?rev=1203602r1=1203601r2=1203602view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/PagingPage.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/PagingPage.java
 Fri Nov 18 11:16:28 2011
@@ -67,7 +67,7 @@ public class PagingPage extends BasePage
}
};
 
-   dataView.setItemsPerPage(8);
+   dataView.setItemsPerPage(8L);
add(dataView);
 
add(new PagingNavigator(navigator, dataView));

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/SortingPage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/SortingPage.java?rev=1203602r1=1203601r2=1203602view=diff
==
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/SortingPage.java
 (original)
+++ 

svn commit: r1203607 [1/2] - in /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/jquery: jquery.js jquery.min.js

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 11:36:05 2011
New Revision: 1203607

URL: http://svn.apache.org/viewvc?rev=1203607view=rev
Log:
WICKET-4236 Use JQuery as a backing library for Wicket's JavaScript code

Upgrade JQuery to 1.7.1rc1

Modified:

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/jquery/jquery.js

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/jquery/jquery.min.js

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/jquery/jquery.js
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/jquery/jquery.js?rev=1203607r1=1203606r2=1203607view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/jquery/jquery.js
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/jquery/jquery.js
 Fri Nov 18 11:36:05 2011
@@ -1,5 +1,5 @@
 /*!
- * jQuery JavaScript Library v1.7
+ * jQuery JavaScript Library v1.7.1rc1
  * http://jquery.com/
  *
  * Copyright 2011, John Resig
@@ -11,7 +11,7 @@
  * Copyright 2011, The Dojo Foundation
  * Released under the MIT, BSD, and GPL Licenses.
  *
- * Date: Thu Nov 3 16:18:21 2011 -0400
+ * Date: Thu Nov 17 19:06:35 2011 -0500
  */
 (function( window, undefined ) {
 
@@ -213,7 +213,7 @@ jQuery.fn = jQuery.prototype = {
selector: ,
 
// The current version of jQuery being used
-   jquery: 1.7,
+   jquery: 1.7.1rc1,
 
// The default length of a jQuery object is 0
length: 0,
@@ -285,9 +285,10 @@ jQuery.fn = jQuery.prototype = {
},
 
eq: function( i ) {
+   i = +i;
return i === -1 ?
this.slice( i ) :
-   this.slice( i, +i + 1 );
+   this.slice( i, i + 1 );
},
 
first: function() {
@@ -438,7 +439,7 @@ jQuery.extend({
 
// Trigger any bound ready events
if ( jQuery.fn.trigger ) {
-   jQuery( document ).trigger( ready ).unbind( 
ready );
+   jQuery( document ).trigger( ready ).off( 
ready );
}
}
},
@@ -505,7 +506,7 @@ jQuery.extend({
},
 
isNumeric: function( obj ) {
-   return obj != null  rdigit.test( obj )  !isNaN( obj );
+   return !isNaN( parseFloat(obj) )  isFinite( obj );
},
 
type: function( obj ) {
@@ -551,7 +552,7 @@ jQuery.extend({
},
 
error: function( msg ) {
-   throw msg;
+   throw new Error( msg );
},
 
parseJSON: function( data ) {
@@ -688,8 +689,6 @@ jQuery.extend({
 
if ( array != null ) {
// The window, strings (and functions) also have 
'length'
-   // The extra typeof function check is to prevent crashes
-   // in Safari 2 (See: #3039)
// Tweaked logic slightly to handle Blackberry 4.7 
RegExp issues #6930
var type = jQuery.type( array );
 
@@ -956,20 +955,6 @@ function doScrollCheck() {
jQuery.ready();
 }
 
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-if ( typeof define === function  define.amd  define.amd.jQuery ) {
-   define( jquery, [], function () { return jQuery; } );
-}
-
 return jQuery;
 
 })();
@@ -1234,7 +1219,8 @@ jQuery.extend({
return this;
},
always: function() {
-   return deferred.done.apply( deferred, 
arguments ).fail.apply( deferred, arguments );
+   deferred.done.apply( deferred, 
arguments ).fail.apply( deferred, arguments );
+   return this;
},
pipe: function( fnDone, fnFail, fnProgress ) {
return jQuery.Deferred(function( 
newDefer ) {
@@ -1347,30 +1333,25 @@ jQuery.extend({
 
 jQuery.support = (function() {
 
-   var div = document.createElement( div ),
- 

svn commit: r1203619 - /wicket/trunk/pom.xml

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 12:11:50 2011
New Revision: 1203619

URL: http://svn.apache.org/viewvc?rev=1203619view=rev
Log:
Disabled maven-clirr-plugin until we need it.


Modified:
wicket/trunk/pom.xml

Modified: wicket/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/pom.xml?rev=1203619r1=1203618r2=1203619view=diff
==
--- wicket/trunk/pom.xml (original)
+++ wicket/trunk/pom.xml Fri Nov 18 12:11:50 2011
@@ -554,6 +554,8 @@

comparisonVersion1.5.2/comparisonVersion
failOnErrorfalse/failOnError
logResultstrue/logResults
+   !-- disabled until we start the 
release candidates --
+   skiptrue/skip
/configuration
/plugin
plugin




svn commit: r1203637 - /wicket/trunk/pom.xml

2011-11-18 Thread pete
Author: pete
Date: Fri Nov 18 13:20:10 2011
New Revision: 1203637

URL: http://svn.apache.org/viewvc?rev=1203637view=rev
Log:
upgrade maven plugin dependencies

Modified:
wicket/trunk/pom.xml

Modified: wicket/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/pom.xml?rev=1203637r1=1203636r2=1203637view=diff
==
--- wicket/trunk/pom.xml (original)
+++ wicket/trunk/pom.xml Fri Nov 18 13:20:10 2011
@@ -505,7 +505,7 @@
extension
groupIdorg.apache.maven.wagon/groupId
artifactIdwagon-ssh-external/artifactId
-   version1.0-beta-7/version
+   version2.0/version
/extension
/extensions
resources
@@ -604,7 +604,7 @@
plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-resources-plugin/artifactId
-   version2.4.3/version
+   version2.5/version
configuration

encoding${project.build.sourceEncoding}/encoding
/configuration
@@ -612,7 +612,7 @@
plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-assembly-plugin/artifactId
-   version2.2/version
+   version2.2.1/version
configuration

appendAssemblyIdfalse/appendAssemblyId

tarLongFileModegnu/tarLongFileMode
@@ -646,7 +646,7 @@
plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-gpg-plugin/artifactId
-   version1.1/version
+   version1.4/version
executions
execution
idsign-artifacts/id
@@ -660,7 +660,7 @@
plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-war-plugin/artifactId
-   version2.1/version
+   version2.1.1/version
configuration

warName${project.artifactId}/warName
/configuration
@@ -668,7 +668,7 @@
plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-jar-plugin/artifactId
-   version2.3.1/version
+   version2.3.2/version
configuration

useDefaultManifestFiletrue/useDefaultManifestFile
archive
@@ -695,7 +695,7 @@
plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-javadoc-plugin/artifactId
-   version2.7/version
+   version2.8/version
configuration
minmemory128m/minmemory
maxmemory256m/maxmemory
@@ -736,7 +736,7 @@
plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-plugin/artifactId
-   version2.9/version
+   version2.10/version
configuration
includes

include**/*Test.java/include
@@ -746,7 +746,7 @@
plugin

groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-surefire-report-plugin/artifactId
-   version2.6/version
+ 

svn commit: r1203639 - /wicket/trunk/pom.xml

2011-11-18 Thread pete
Author: pete
Date: Fri Nov 18 13:22:01 2011
New Revision: 1203639

URL: http://svn.apache.org/viewvc?rev=1203639view=rev
Log:
upgrade maven library dependencies

Modified:
wicket/trunk/pom.xml

Modified: wicket/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/pom.xml?rev=1203639r1=1203638r2=1203639view=diff
==
--- wicket/trunk/pom.xml (original)
+++ wicket/trunk/pom.xml Fri Nov 18 13:22:01 2011
@@ -31,7 +31,7 @@
properties

project.build.sourceEncodingUTF-8/project.build.sourceEncoding
jetty.version7.4.2.v20110526/jetty.version
-   spring.version3.0.5.RELEASE/spring.version
+   spring.version3.0.6.RELEASE/spring.version
/properties
profiles
profile
@@ -367,22 +367,22 @@
dependency
groupIdorg.slf4j/groupId
artifactIdslf4j-api/artifactId
-   version1.6.1/version
+   version1.6.4/version
/dependency
dependency
groupIdorg.slf4j/groupId
artifactIdslf4j-ext/artifactId
-   version1.6.1/version
+   version1.6.4/version
/dependency
dependency
groupIdorg.slf4j/groupId
artifactIdslf4j-log4j12/artifactId
-   version1.6.1/version
+   version1.6.4/version
/dependency
dependency
groupIdorg.slf4j/groupId
artifactIdjcl-over-slf4j/artifactId
-   version1.6.1/version
+   version1.6.4/version
/dependency
dependency
groupIdlog4j/groupId
@@ -437,7 +437,7 @@
dependency
groupIdcglib/groupId
artifactIdcglib/artifactId
-   version2.2/version
+   version2.2.2/version
/dependency
dependency
groupIdcommons-httpclient/groupId
@@ -464,7 +464,7 @@
dependency
groupIdhttpunit/groupId
artifactIdhttpunit/artifactId
-   version1.6.1/version
+   version1.7/version
scopetest/scope
/dependency
/dependencies




svn commit: r1203643 - /wicket/trunk/pom.xml

2011-11-18 Thread pete
Author: pete
Date: Fri Nov 18 13:27:44 2011
New Revision: 1203643

URL: http://svn.apache.org/viewvc?rev=1203643view=rev
Log:
downgraded httpunit back from 1.7 to 1.6.1 since some parts of the code depend 
on it

Modified:
wicket/trunk/pom.xml

Modified: wicket/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/pom.xml?rev=1203643r1=1203642r2=1203643view=diff
==
--- wicket/trunk/pom.xml (original)
+++ wicket/trunk/pom.xml Fri Nov 18 13:27:44 2011
@@ -464,7 +464,7 @@
dependency
groupIdhttpunit/groupId
artifactIdhttpunit/artifactId
-   version1.7/version
+   version1.6.1/version
scopetest/scope
/dependency
/dependencies




svn commit: r1203650 - in /wicket/trunk/wicket-core/src: main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js test/js/event.js

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 13:51:58 2011
New Revision: 1203650

URL: http://svn.apache.org/viewvc?rev=1203650view=rev
Log:
Pass the arguments of W.E.publish() to the subsribers


Modified:

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
wicket/trunk/wicket-core/src/test/js/event.js

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js?rev=1203650r1=1203649r2=1203650view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
 Fri Nov 18 13:51:58 2011
@@ -153,11 +153,9 @@
*/
subscribe: function (topic, subscriber) {

-   if (typeof(topic) === 'undefined' || topic === 
null) {
-   return;
+   if (topic) {
+   jQuery(document).on(topic, subscriber);
}
-
-   jQuery(document).on(topic, subscriber);
},
 
/**
@@ -169,11 +167,13 @@
* @param String topic - the channel name for which all 
subscribers will be notified.
*/
publish: function (topic) {
-   if (typeof(topic) === 'undefined' || topic === 
null) {
-   return;
+   if (topic) {
+   // cut the topic argument
+   var args = 
Array.prototype.slice.call(arguments).slice(1);
+   
+   jQuery(document).triggerHandler(topic, 
args);
+   jQuery(document).triggerHandler('*', 
args);
}
-   jQuery(document).triggerHandler(topic);
-   jQuery(document).triggerHandler('*');
}
}
});

Modified: wicket/trunk/wicket-core/src/test/js/event.js
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/js/event.js?rev=1203650r1=1203649r2=1203650view=diff
==
--- wicket/trunk/wicket-core/src/test/js/event.js (original)
+++ wicket/trunk/wicket-core/src/test/js/event.js Fri Nov 18 13:51:58 2011
@@ -187,15 +187,18 @@ jQuery(document).ready(function() {
 

test('all topics', function() {
-   expect(2);
+   expect(8);
 
var subscriber = function() {
ok(true, 'Should be notified for any topic name');
+   equal(arguments.length, 3, 1 jQuery.Event + our two 
args);
+   equal(arguments[1], arg1, 'arg1' must be at position 
1);
+   equal(arguments[2], arg2, 'arg2' must be at position 
2);
};
 
Wicket.Event.subscribe('*', subscriber);
 
-   Wicket.Event.publish('topicName1');
-   Wicket.Event.publish('topicName2');
+   Wicket.Event.publish('topicName1', arg1, arg2);
+   Wicket.Event.publish('topicName2', arg1, arg2);
});
 });




[jira] [Updated] (WICKET-3367) Rewrite all JavaScript inline event handlers to be proper attached event handlers

2011-11-18 Thread Martin Grigorov (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-3367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov updated WICKET-3367:


Attachment: WICKET-3367.patch

He is a possible change to accomplish this.

 Rewrite all JavaScript inline event handlers to be proper attached event 
 handlers
 -

 Key: WICKET-3367
 URL: https://issues.apache.org/jira/browse/WICKET-3367
 Project: Wicket
  Issue Type: Improvement
Reporter: Igor Vaynberg
 Fix For: 6.0.0

 Attachments: WICKET-3367.patch


 Currently events added inside onclick, onsubmit attributes are problematic 
 because they cannot be cancelled by other event handlers that are attached to 
 events via javascript's addEventListener() and friends. We should extract all 
 such inlined handlers and attach them via our Wicket.Event api.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1203658 - /wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java

2011-11-18 Thread mgrigorov
Author: mgrigorov
Date: Fri Nov 18 14:19:35 2011
New Revision: 1203658

URL: http://svn.apache.org/viewvc?rev=1203658view=rev
Log:
Use DateFormatSymbols.getInstance(Locale) without reflection


Modified:

wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java

Modified: 
wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java?rev=1203658r1=1203657r2=1203658view=diff
==
--- 
wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
 (original)
+++ 
wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
 Fri Nov 18 14:19:35 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.wicket.extensions.yui.calendar;
 
-import java.lang.reflect.Method;
 import java.text.DateFormatSymbols;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -74,21 +73,6 @@ import org.joda.time.DateTime;
  */
 public class DatePicker extends Behavior
 {
-   private static Method GETINSTANCEMETHOD = null;
-
-   static
-   {
-   try
-   {
-   // try to use JDK 6 
DateFormatSymbols.getInstance(Locale)
-   GETINSTANCEMETHOD = 
DateFormatSymbols.class.getMethod(getInstance,
-   new Class[] { Locale.class });
-   }
-   catch (Exception e)
-   {
-   // ignore
-   }
-   }
 
/**
 * Exception thrown when the bound component does not produce a format 
this date picker can work
@@ -586,19 +570,7 @@ public class DatePicker extends Behavior
return;
}
 
-   DateFormatSymbols dfSymbols = null;
-   if (GETINSTANCEMETHOD != null)
-   {
-   // try to use JDK 6 
DateFormatSymbols.getInstance(Locale)
-   try
-   {
-   dfSymbols = 
(DateFormatSymbols)GETINSTANCEMETHOD.invoke(null, locale);
-   }
-   catch (Exception e)
-   {
-   // ignore
-   }
-   }
+   DateFormatSymbols dfSymbols = 
DateFormatSymbols.getInstance(locale);
if (dfSymbols == null)
{
dfSymbols = new DateFormatSymbols(locale);




[jira] [Commented] (WICKET-3367) Rewrite all JavaScript inline event handlers to be proper attached event handlers

2011-11-18 Thread Martin Grigorov (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-3367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152903#comment-13152903
 ] 

Martin Grigorov commented on WICKET-3367:
-

We need to improve HeaderResponse to not create a new script for each event 
binding. It would be much better if there is just one script with bigger body.

 Rewrite all JavaScript inline event handlers to be proper attached event 
 handlers
 -

 Key: WICKET-3367
 URL: https://issues.apache.org/jira/browse/WICKET-3367
 Project: Wicket
  Issue Type: Improvement
Reporter: Igor Vaynberg
 Fix For: 6.0.0

 Attachments: WICKET-3367.patch


 Currently events added inside onclick, onsubmit attributes are problematic 
 because they cannot be cancelled by other event handlers that are attached to 
 events via javascript's addEventListener() and friends. We should extract all 
 such inlined handlers and attach them via our Wicket.Event api.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-3367) Rewrite all JavaScript inline event handlers to be proper attached event handlers

2011-11-18 Thread Martin Grigorov (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-3367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152906#comment-13152906
 ] 

Martin Grigorov commented on WICKET-3367:
-

How big will be the refactoring here ?
Matej did some major refactoring at 
http://svn.apache.org/repos/asf/wicket/sandbox/knopp/experimental few years 
ago. See https://cwiki.apache.org/WICKET/wicket-ajax-rewriting.html for more 
info. While I like the approach with o.a.w.ajax.AjaxRequestAttributes.java 
there I prefer to avoid of making bigger changes. Knowing how much Ajax I used 
in my previous applications at dailyjob I see it will be quite a work to 
migrate.

 Rewrite all JavaScript inline event handlers to be proper attached event 
 handlers
 -

 Key: WICKET-3367
 URL: https://issues.apache.org/jira/browse/WICKET-3367
 Project: Wicket
  Issue Type: Improvement
Reporter: Igor Vaynberg
 Fix For: 6.0.0

 Attachments: WICKET-3367.patch


 Currently events added inside onclick, onsubmit attributes are problematic 
 because they cannot be cancelled by other event handlers that are attached to 
 events via javascript's addEventListener() and friends. We should extract all 
 such inlined handlers and attach them via our Wicket.Event api.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-3367) Rewrite all JavaScript inline event handlers to be proper attached event handlers

2011-11-18 Thread Igor Vaynberg (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-3367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152942#comment-13152942
 ] 

Igor Vaynberg commented on WICKET-3367:
---

doing it this way wont solve the problem of not being able to attach multiple 
behaviors to the same event. we should probably write out the entire handler in 
wicket.event.add() instead of writing it into the attribute.

also, i think adding AjaxAttributes now would be a Good Thing. they stay out of 
the way unless you want to touch them. and, if you are touching the callback 
url in the behavior chances are you will want to rewrite your code using 
attributes because without them it is very fragile. you have to do a 
sql-injeciton-like attack on the url string to even get your own attributes 
into it...so the current way is broken anyways.

 Rewrite all JavaScript inline event handlers to be proper attached event 
 handlers
 -

 Key: WICKET-3367
 URL: https://issues.apache.org/jira/browse/WICKET-3367
 Project: Wicket
  Issue Type: Improvement
Reporter: Igor Vaynberg
 Fix For: 6.0.0

 Attachments: WICKET-3367.patch


 Currently events added inside onclick, onsubmit attributes are problematic 
 because they cannot be cancelled by other event handlers that are attached to 
 events via javascript's addEventListener() and friends. We should extract all 
 such inlined handlers and attach them via our Wicket.Event api.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-1429) AjaxFormSubmitBehavior doesn't work well with nested forms

2011-11-18 Thread Matthew Buckett (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13152975#comment-13152975
 ] 

Matthew Buckett commented on WICKET-1429:
-

Just starting out with wicket I tried using a nested form and 
AjaxFormSubmitBahavior on the nested form. Seeing how the implementation of 
nested forms works (outputting a div for nested forms), having the 
AjaxFormSubmitBehaviour add an onsubmit handler to a div plainly isn't going to 
work. 

Would checking that AjaxFormSubmitBehaviour isn't added to a nested form 
helpful for debugging?

 AjaxFormSubmitBehavior doesn't work well with nested forms
 --

 Key: WICKET-1429
 URL: https://issues.apache.org/jira/browse/WICKET-1429
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 1.3.2
 Environment: Windows XP SP2, JDK 1.5, Apache Tomcat 6.0.14
Reporter: Olivier Dutrieux
 Attachments: Wicket.zip


 Hello everybody,
 I need to know if it's normal I get error when I do that : 
 [code=TestPage.java]
 public class TestPage extends WebPage {
   public TestPage() {
   Form f = new Form(f);
   f.add(new AjaxFormSubmitBehavior(onsubmit) {
   @Override
   protected void onSubmit(AjaxRequestTarget target) {
   throw new UnsupportedOperationException(Not 
 supported yet.);
   }
   @Override
   protected void onError(AjaxRequestTarget target) {
   throw new UnsupportedOperationException(Not 
 supported yet.);
   }
   
   });
   f.setOutputMarkupId(true);
   add(f);
   }
 }
 [code=TestPage.html]
 html
   head
 title/title
 meta http-equiv=Content-Type content=text/html; charset=UTF-8
   /head
   body
   form wicket:id=f
   input type=submit value=Sumbit/
   /form
   /body
 /html
 I get a error message : 
 WicketMessage: Exception in rendering component: [MarkupContainer [Component 
 id = f, page = fr.pasteur.sig.wicket.bug.TestPage, path = 0:f.Form, isVisible 
 = true, isVersioned = true]]
 Root cause:
 java.lang.IllegalStateException: form was not specified in the constructor 
 and cannot be found in the hierarchy of the component this behavior is 
 attached to
 at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.getForm(AjaxFormSubmitBehavior.java:85)
 at 
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.getEventHandler(AjaxFormSubmitBehavior.java:97)
 at 
 org.apache.wicket.ajax.AjaxEventBehavior.onComponentTag(AjaxEventBehavior.java:108)
 at 
 org.apache.wicket.behavior.AbstractAjaxBehavior.onComponentTag(AbstractAjaxBehavior.java:132)
 at org.apache.wicket.Component.renderComponentTag(Component.java:3807)
 at org.apache.wicket.Component.renderComponent(Component.java:2462)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1411)
 at org.apache.wicket.markup.html.form.Form.onRender(Form.java:1692)
 at org.apache.wicket.Component.render(Component.java:2308)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1297)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1427)
 at org.apache.wicket.Page.onRender(Page.java:1460)
 at org.apache.wicket.Component.render(Component.java:2308)
 at org.apache.wicket.Page.renderPage(Page.java:906)
 at 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:231)
 at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
 at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1172)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1243)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:358)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at 
 

svn commit: r1203883 - in /wicket/trunk: build.gradle.disabled settings.gradle.disabled

2011-11-18 Thread ivaynberg
Author: ivaynberg
Date: Fri Nov 18 22:08:36 2011
New Revision: 1203883

URL: http://svn.apache.org/viewvc?rev=1203883view=rev
Log:
disable gradle build files since we are not using them

Added:
wicket/trunk/build.gradle.disabled
wicket/trunk/settings.gradle.disabled

Added: wicket/trunk/build.gradle.disabled
URL: 
http://svn.apache.org/viewvc/wicket/trunk/build.gradle.disabled?rev=1203883view=auto
==
--- wicket/trunk/build.gradle.disabled (added)
+++ wicket/trunk/build.gradle.disabled Fri Nov 18 22:08:36 2011
@@ -0,0 +1,204 @@
+// 
+// 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.
+// 
+// Wicket Gradle build file
+// 
+// @author Juergen Donnerstag
+// 
+
+// A convenience method that calls the dependsOn method of the parent project 
+// for every child project (not every sub project). It declares an execution 
+// dependency on all children. 
+dependsOnChildren()
+
+// For testing purposes 
+/*
+def localReleaseRepo = new 
File(${System.properties.'user.home'}/local-gradle-repository/release).toURL().toString()
+def localSnapshotRepo = new 
File(${System.properties.'user.home'}/local-gradle-repository/snapshot).toURL().toString()
+*/
+
+// The root project is like a container and the subprojects method iterates 
+// over the elements of this container - the projects in this instance, but 
+// not deep subprojects - and injects the specified configuration. This way 
+// we can easily define some common dependencies
+subprojects { prj -
+   apply plugin: 'java'
+   apply plugin: 'maven'
+   // apply plugin: 'code-quality'
+   // apply plugin: 'project-reports'
+   
+   // Wicket Maven group and version 
+   group = 'org.apache.wicket'
+   version = '1.5'
+   if(!System.properties.'release') {
+   version = version + '-SNAPSHOT'
+   }
+
+   /*
+   gradle.taskGraph.whenReady {taskGraph -
+   if (taskGraph.hasTask(':release')) {
+   version = '1.5'
+   } else {
+   version = '1.5-SNAPSHOT'
+   }
+   }
+   */  
+
+   // Subproject wicket is only used to build the uber jars. No need to 
have eclipse project files
+   if (prj.name != wicket) {
+   apply plugin: 'eclipse'
+   apply plugin: 'idea'
+
+   // We don't need / want the WTP/WST natures and facets
+   prj.eclipseProject.whenConfigured { p -
+   p.natures.removeAll 
'org.eclipse.wst.common.project.facet.core.nature', 
'org.eclipse.wst.common.modulecore.ModuleCoreNature', 
'org.eclipse.jem.workbench.JavaEMFNature'
+   
+   p.buildCommands.removeAll { 
it.name.startsWith('org.eclipse.wst.') }
+   }   
+
+   // No need to create .settings/org.eclipse.wst.* files either
+   prj.tasks.all { if(it.name.contains('eclipseWtp')) { it.enabled 
= false }}
+
+   // org.eclipse.jdt.core.prefs is provided via SVN. No need for 
gradle to modify them
+   prj.tasks.all { if(it.name.contains('eclipseJdt')) { it.enabled 
= false }}
+   prj.tasks.all { if(it.name.contains('cleanEclipseJdt')) { 
it.enabled = false }}
+   }
+   
+   // Use maven output dir
+   setBuildDir 'target'
+
+   sourceCompatibility = 1.5
+   targetCompatibility = 1.5
+
+   compileJava.options.compilerArgs = ['-Xlint:unchecked', 
'-Xlint:deprecation', '-g']
+   
+   // We have plenty of *.html, *.xml and *.properties files which we want 
to 
+   // copy/forward, like we do for *.java files.
+   sourceSets.main.resources.srcDir 'src/main/java' 
+   sourceSets.test.resources.srcDir 'src/test/java' 
+
+   task packageTests(type: Jar) {
+   from sourceSets.test.classes
+   classifier = 'tests'
+   }
+
+   artifacts.archives packageTests
+
+

svn commit: r1203884 - in /wicket/branches/wicket-1.5.x: build.gradle settings.gradle

2011-11-18 Thread ivaynberg
Author: ivaynberg
Date: Fri Nov 18 22:09:24 2011
New Revision: 1203884

URL: http://svn.apache.org/viewvc?rev=1203884view=rev
Log:
remove gradle files since we are not using it

Removed:
wicket/branches/wicket-1.5.x/build.gradle
wicket/branches/wicket-1.5.x/settings.gradle



svn commit: r1203891 - in /wicket/trunk: wicket-core/src/main/java/org/apache/wicket/markup/html/list/ wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/ wicket-extensions/

2011-11-18 Thread ivaynberg
Author: ivaynberg
Date: Fri Nov 18 22:48:46 2011
New Revision: 1203891

URL: http://svn.apache.org/viewvc?rev=1203891view=rev
Log:
switch from using int to long in IDataProvider and the cascade from that
Issue: WICKET-1175

Modified:

wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/list/Loop.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java

wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/list/Loop.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/list/Loop.java?rev=1203891r1=1203890r2=1203891view=diff
==
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/list/Loop.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/list/Loop.java
 Fri Nov 18 22:48:46 2011
@@ -49,9 +49,9 @@ public abstract class Loop extends Abstr
 *max index of the loop
 * @see org.apache.wicket.Component#Component(String, IModel)
 */
-   public Loop(final String id, final int iterations)
+   public Loop(final String id, final long iterations)
{
-   super(id, new ModelInteger(iterations));
+   super(id, new ModelLong(iterations));
}
 
/**
@@ -63,7 +63,7 @@ public abstract class Loop extends Abstr
 *Must contain a Integer model object
 * @see org.apache.wicket.Component#Component(String, IModel)
 */
-   public Loop(final String id, final IModelInteger model)
+   public Loop(final String id, final IModelLong model)
{
super(id, model);
}

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java?rev=1203891r1=1203890r2=1203891view=diff
==
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
 Fri Nov 18 22:48:46 2011
@@ -94,14 +94,14 @@ public class TabbedPanel extends Panel
 
this.tabs = Args.notNull(tabs, tabs);
 
-   final IModelInteger tabCount = new 
AbstractReadOnlyModelInteger()
+   final IModelLong tabCount = new AbstractReadOnlyModelLong()
{
private static final long serialVersionUID = 1L;
 
@Override
-   public Integer getObject()
+   public Long getObject()
{
-   return TabbedPanel.this.tabs.size();
+   return (long)TabbedPanel.this.tabs.size();
}
};
 

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java?rev=1203891r1=1203890r2=1203891view=diff
==
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java
 Fri Nov 18 22:48:46 2011
@@ -104,7 +104,7 @@ public abstract class RatingPanel extend
 
private RatingStarBar(final String id, final IModelInteger 
model)
{
-   super(id, model);
+   super(id, new IntToLongModel(model));
}
 
@Override
@@ -432,4 +432,39 @@ public abstract class RatingPanel extend
 *the request target, null if the request is a regular, 
non-AJAX request.
 */
protected abstract void onRated(int rating, AjaxRequestTarget target);
+
+   /**
+* Adapts an int model to a long model
+* 
+* @author igor
+*/
+   private static class IntToLongModel implements IModelLong
+   {
+   private final IModelInteger integer;
+
+   public IntToLongModel(IModelInteger integer)
+   {
+   this.integer = integer;
+   }
+
+   @Override
+   public void detach()
+   {
+   integer.detach();
+   }
+
+   

[jira] [Commented] (WICKET-4019) Portlet Support 1.5

2011-11-18 Thread Peter Pastrnak (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13153225#comment-13153225
 ] 

Peter Pastrnak commented on WICKET-4019:


Finally i had time to have a look at the query vs. post parameters problem and 
I've realized that there is no access to them in the include, but they are 
accessible in the portlet, so the patch was simple, I just had to include 
(merge) the portlet request parameters in the url that is forwarded (using 
include) to the filter. I've also found out, that without this fix, every ajax 
multipart submit creates a  new version of the page, as it sends 
'wicket-ajax=true' as GET parameters.
Also, I guess, version 1.5.2 started prepending the portlet namespace to a 
replaced component twice, as it reuses the old markupId and calls the 
onInitializationListener again. To fix this, I've just added a check, if the 
prefix is already there.
As soon as I get the commit access on wicket stuff, I can commit these 2 fixes.

As the request query parameters are available in portlet, it would be 
definitely worth to get rid off the filter in the portlet support and then 
remove the unnecessary response caching. It could bring nice performance 
increase, simpler code and one step easier configuration. But for this I need 
1-2 days plus run some tests, so maybe I'll have a look at it in December...

I use this page as a notepad (sorry for that), so don't bother reacting... 
Maybe once I'll start writing a wiki page ;)...

 Portlet Support 1.5
 ---

 Key: WICKET-4019
 URL: https://issues.apache.org/jira/browse/WICKET-4019
 Project: Wicket
  Issue Type: New Feature
  Components: wicket
Affects Versions: 1.5-RC7
Reporter: Peter Pastrnak
 Attachments: PortletServletRequestWrapper.java, ResponseState.java, 
 Wicket - Portlet.htm, wicket-1.5.2.1.zip, wicket-portlet-1.5.0.zip, 
 wicket-portlet-1.5.1.1.zip, wicket-portlet-1.5.1.2.zip, 
 wicket-portlet-1.5.1.3.zip, wicket-portlet-1.5.1.4.zip, 
 wicket-portlet-1.5.1.5.zip, wicket-portlet-1.5.1.zip, 
 wicket-portlet-1.5.2.2.zip, wicket-portlet-1.5.2.zip, 
 wicket-portlet-1.5.RC7.zip, with bind(this).jpg, without bind(this).jpg


 Url returned by the RequestMapper does not seem to be properly rendered, as 
 it does not encode question mark character in the Url parameter value (I 
 haven't checked the w3c spec, but at least Liferay Portal seems to require it 
 to be encoded) 
 The reason is this definition in the UrlEncoder: 
 case QUERY : 
 // to allow direct passing of URL in query 
 dontNeedEncoding.set('/'); 
 // to allow direct passing of URL in query 
 dontNeedEncoding.set('?'); 
 Currently URL http://host/file?param=a?b; would be encoded as 
 http://host/file?param=a?b;, instead of http://host/file?param=a%3Fb;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (WICKET-4242) Detect new Markup Files in Development Mode

2011-11-18 Thread bernard (Created) (JIRA)
Detect new Markup Files in Development Mode
---

 Key: WICKET-4242
 URL: https://issues.apache.org/jira/browse/WICKET-4242
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 1.5.3
Reporter: bernard


An extension of 
http://www.wicketframework.org/faqs.html#how-reload-changed-markup-files

Let Wicket detect new markup files not only modifications to existing ones.

This is useful if a developer fails to add a markup file. That causes an 
exception. Currently the application has to be re-deployed to fix this 
condition.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira