[jira] [Assigned] (WICKET-5194) Adding AjaxFormValidatingBehavior to the form prevents form from being filled

2013-05-22 Thread Martin Grigorov (JIRA)

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

Martin Grigorov reassigned WICKET-5194:
---

Assignee: Martin Grigorov

 Adding AjaxFormValidatingBehavior to the form prevents form from being filled
 -

 Key: WICKET-5194
 URL: https://issues.apache.org/jira/browse/WICKET-5194
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.8.0
Reporter: Maxim Solodovnik
Assignee: Martin Grigorov
 Attachments: AjaxFormValBehavior.zip, WICKET-5178.patch


 It is impossible to enter any text in the form fields in case
 AjaxFormValidatingBehavior.addToAllFormComponents(form, keydown, 
 Duration.ONE_SECOND);
 was added.
 Everything works as expected in 6.7.0

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (WICKET-5194) Adding AjaxFormValidatingBehavior to the form prevents form from being filled

2013-05-22 Thread Martin Grigorov (JIRA)

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

Martin Grigorov commented on WICKET-5194:
-

Indeed there is a problem with 'allowDefault' default value being 'false'.
Andrea's quickstart shows that input type=text ../ + 'key(down|up)' event 
doesn't work unless 'allowDefault=true' is set explicitly.

To avoid overriding #updateAjaxAttributes(AjaxRequestAttributes attributes) for 
each and every Ajax behavior in your app one can do:

getAjaxRequestTargetListeners().add(new AjaxRequestTarget.AbstractListener()
{
@Override
public void updateAjaxAttributes(AjaxRequestAttributes 
attributes)
{
super.updateAjaxAttributes(attributes);

attributes.setAllowDefault(true);
}
});

in MyApp#init().

I'll raise this problem in dev@.

 Adding AjaxFormValidatingBehavior to the form prevents form from being filled
 -

 Key: WICKET-5194
 URL: https://issues.apache.org/jira/browse/WICKET-5194
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.8.0
Reporter: Maxim Solodovnik
Assignee: Martin Grigorov
 Attachments: AjaxFormValBehavior.zip, WICKET-5178.patch


 It is impossible to enter any text in the form fields in case
 AjaxFormValidatingBehavior.addToAllFormComponents(form, keydown, 
 Duration.ONE_SECOND);
 was added.
 Everything works as expected in 6.7.0

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (WICKET-5194) Adding AjaxFormValidatingBehavior to the form prevents form from being filled

2013-05-22 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-5194:


Attachment: WICKET-5194.patch

A patch that sets 'allowDefault' default value to 'true'. 

 Adding AjaxFormValidatingBehavior to the form prevents form from being filled
 -

 Key: WICKET-5194
 URL: https://issues.apache.org/jira/browse/WICKET-5194
 Project: Wicket
  Issue Type: Bug
  Components: wicket
Affects Versions: 6.8.0
Reporter: Maxim Solodovnik
Assignee: Martin Grigorov
 Attachments: AjaxFormValBehavior.zip, WICKET-5178.patch, 
 WICKET-5194.patch


 It is impossible to enter any text in the form fields in case
 AjaxFormValidatingBehavior.addToAllFormComponents(form, keydown, 
 Duration.ONE_SECOND);
 was added.
 Everything works as expected in 6.7.0

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


svn commit: r1485118 - in /wicket/common/site/trunk: _posts/2013-05-17-wicket-6.8.0-released.md _site/2013/05/17/wicket-6.8.0-released.html _site/atom.xml _site/index.html

2013-05-22 Thread dashorst
Author: dashorst
Date: Wed May 22 08:48:05 2013
New Revision: 1485118

URL: http://svn.apache.org/r1485118
Log:
Seventh - eighth

Modified:
wicket/common/site/trunk/_posts/2013-05-17-wicket-6.8.0-released.md
wicket/common/site/trunk/_site/2013/05/17/wicket-6.8.0-released.html
wicket/common/site/trunk/_site/atom.xml
wicket/common/site/trunk/_site/index.html

Modified: wicket/common/site/trunk/_posts/2013-05-17-wicket-6.8.0-released.md
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_posts/2013-05-17-wicket-6.8.0-released.md?rev=1485118r1=1485117r2=1485118view=diff
==
--- wicket/common/site/trunk/_posts/2013-05-17-wicket-6.8.0-released.md 
(original)
+++ wicket/common/site/trunk/_posts/2013-05-17-wicket-6.8.0-released.md Wed May 
22 08:48:05 2013
@@ -5,7 +5,7 @@ title: Apache Wicket 6.8.0 released
 
 The Apache Wicket PMC is proud to announce Apache Wicket 6.8.0!
 
-This release marks the seventh minor release of Wicket 6. Starting
+This release marks the eighth minor release of Wicket 6. Starting
 with Wicket 6 we use semantic versioning for the future development
 of Wicket, and as such no API breaks are present in this release
 compared to 6.0.0.

Modified: wicket/common/site/trunk/_site/2013/05/17/wicket-6.8.0-released.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/2013/05/17/wicket-6.8.0-released.html?rev=1485118r1=1485117r2=1485118view=diff
==
--- wicket/common/site/trunk/_site/2013/05/17/wicket-6.8.0-released.html 
(original)
+++ wicket/common/site/trunk/_site/2013/05/17/wicket-6.8.0-released.html Wed 
May 22 08:48:05 2013
@@ -173,7 +173,7 @@
h1Apache Wicket 6.8.0 released/h1
pThe Apache Wicket PMC is proud to announce Apache 
Wicket 6.8.0!/p
 
-pThis release marks the seventh minor release of Wicket 6. Starting with 
Wicket 6 we use semantic versioning for the future development of Wicket, and 
as such no API breaks are present in this release compared to 6.0.0./p
+pThis release marks the eighth minor release of Wicket 6. Starting with 
Wicket 6 we use semantic versioning for the future development of Wicket, and 
as such no API breaks are present in this release compared to 6.0.0./p
 
 h3 id='using_this_release'Using this release/h3
 

Modified: wicket/common/site/trunk/_site/atom.xml
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/atom.xml?rev=1485118r1=1485117r2=1485118view=diff
==
--- wicket/common/site/trunk/_site/atom.xml (original)
+++ wicket/common/site/trunk/_site/atom.xml Wed May 22 08:48:05 2013
@@ -4,7 +4,7 @@
  titleApache Wicket/title
  link href=http://wicket.apache.org/atom.xml; rel=self/
  link href=http://wicket.apache.org//
- updated2013-05-22T00:01:15+02:00/updated
+ updated2013-05-22T10:47:34+02:00/updated
  idhttp://wicket.apache.org//id
  author
nameApache Wicket/name
@@ -19,7 +19,7 @@
idhttp://wicket.apache.org/2013/05/17/wicket-6.8.0-released/id
content type=htmllt;pgt;The Apache Wicket PMC is proud to announce 
Apache Wicket 6.8.0!lt;/pgt;
 
-lt;pgt;This release marks the seventh minor release of Wicket 6. Starting 
with Wicket 6 we use semantic versioning for the future development of Wicket, 
and as such no API breaks are present in this release compared to 
6.0.0.lt;/pgt;
+lt;pgt;This release marks the eighth minor release of Wicket 6. Starting 
with Wicket 6 we use semantic versioning for the future development of Wicket, 
and as such no API breaks are present in this release compared to 
6.0.0.lt;/pgt;
 
 lt;h3 id='using_this_release'gt;Using this releaselt;/h3gt;
 

Modified: wicket/common/site/trunk/_site/index.html
URL: 
http://svn.apache.org/viewvc/wicket/common/site/trunk/_site/index.html?rev=1485118r1=1485117r2=1485118view=diff
==
--- wicket/common/site/trunk/_site/index.html (original)
+++ wicket/common/site/trunk/_site/index.html Wed May 22 08:48:05 2013
@@ -192,7 +192,7 @@
 pWicket is released under the a 
href='http://www.apache.org/licenses/LICENSE-2.0.html'Apache License, Version 
2.0/a./p
 
 h1 id='apache_wicket_680_released'a 
href='/2013/05/17/wicket-6.8.0-released.html'Apache Wicket 6.8.0 
released/a/h1
-pThe Apache Wicket PMC is proud to announce Apache Wicket 6.8.0!/ppThis 
release marks the seventh minor release of Wicket 6. Starting with Wicket 6 we 
use semantic versioning for the future development of Wicket, and as such no 
API breaks are present in this release compared to 6.0.0./ph3 
id='using_this_release'Using this release/h3pWith Apache Maven update your 
dependency to (and don#8217;t forget to update any other dependencies on 
Wicket projects to the same version):/pdiv class='highlight'precode 
class='xml'span 

[jira] [Created] (WICKET-5197) Rename AjaxRequestAttributes#allowDefault to #preventDefault

2013-05-22 Thread Martin Grigorov (JIRA)
Martin Grigorov created WICKET-5197:
---

 Summary: Rename AjaxRequestAttributes#allowDefault to 
#preventDefault
 Key: WICKET-5197
 URL: https://issues.apache.org/jira/browse/WICKET-5197
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 7.0.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov
Priority: Minor


Rename AjaxRequestAttributes#allowDefault to #preventDefault to be in sync with 
jQuery. 
Also change the default behavior to be allowed, i.e. by default preventDefault 
should be false.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (WICKET-5197) Rename AjaxRequestAttributes#allowDefault to #preventDefault

2013-05-22 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-5197:


Fix Version/s: 7.0.0

 Rename AjaxRequestAttributes#allowDefault to #preventDefault
 

 Key: WICKET-5197
 URL: https://issues.apache.org/jira/browse/WICKET-5197
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 7.0.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov
Priority: Minor
 Fix For: 7.0.0


 Rename AjaxRequestAttributes#allowDefault to #preventDefault to be in sync 
 with jQuery. 
 Also change the default behavior to be allowed, i.e. by default 
 preventDefault should be false.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[CONF] Apache Wicket Wicket Ajax

2013-05-22 Thread confluence







Wicket Ajax
Page edited by Martin Grigorov


Comment:
Add an entry for the new Ajax attribute - EventPropagation


 Changes (1)
 




...
| request timeout | a timeout to abort the request if there is no response. | 0 (no timeout) | rt | | allow default | a boolean flag which indicates whether to allow the default behavior of the HTML element which listens for the event. For example: clicking on Ajax checkbox should allow the default behavior to actually check the box. | false | ad | 
| stop propagation | an enum which controls whether to stop the propagation of the _javascript_ event to its targets parent nodes. Possible values: STOP, STOP_IMMEDIATELY, BUBBLE. | STOP | sp | 
| async | a boolean flag that indicates whether the Ajax call should be asynchronous or not. | true | async | | throttling settings | settings which define whether the Ajax call should be throttled and for how long. See the javadoc of org.apache.wicket.ajax.attributes.ThrottlingSettings for more information. | no throttling | tr | 
...


Full Content



What ?
Why ?
Design and implementation
Table with renamed methods from the previous version
Configuration

Setup
Resource dependencies

AjaxRequestAttributes
Migration steps

o.a.w.ajax.IAjaxCallDecorator is replaced with o.a.w.ajax.attributes.IAjaxCallListener.
Global Ajax call listeners
Automatically migrated attributes.

Tests for the client side Wicket Ajax functionality
Blog articles
FAQ

How to check whether my custom version of the backing _javascript_ library (jQuery) doesn't break Wicket internals somehow ?
What parameters are passed to the handlers ?
How to use the preconditions with non-native/_javascript_-based confirm dialogs ?



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 






Configuration

Setup

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

MyApplication#init():


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

  IJavaScriptLibrarySettings jsSettings = getJavaScriptLibrarySettings();

  jsSettings.setJQueryReference(new MyJQueryReference());

  jsSettings.setWicketEventReference(new DojoWicketEventReference());

  jsSettings.setWicketAjaxReference(new DojoWicketAjaxReference());

}



Resource dependencies

Since Wicket 6.0 ResourceReference can have dependencies and it is recommended to properly define the dependency chain between this classes.
See the code of org.apache.wicket.ajax.WicketAjaxJQueryResourceReference to see how the default jQuery based implementation does that.

If the user application needs to upgrade/downgrade to new/old version of jQuery then just the first line above is needed:


  getJavaScriptLibrarySettings().setJQueryReference(new AnotherVersionOfJQueryReference());



If the user application needs to use Dojo instead of jQuery then it has provide _javascript_ResourceReferences for wicket-event-dojo.js and wicket-ajax-dojo.js (e.g. DojoWicketEventReference and DojoWicketAjaxReference). Those references should define dependency to 

[1/3] git commit: Java 1.7 - diamond operators

2013-05-22 Thread mgrigorov
Updated Branches:
  refs/heads/master 9fdbd9f6a - 548e63efa


Java 1.7 - diamond operators


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/92629fdf
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/92629fdf
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/92629fdf

Branch: refs/heads/master
Commit: 92629fdf0d337fddfe29d9317bb9573ade4ad7a1
Parents: 9fdbd9f
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Thu May 16 15:10:47 2013 +0300
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Thu May 16 17:30:04 2013 +0300

--
 .../examples/repeater/AjaxDataTablePage.java   |   16 +++---
 1 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/92629fdf/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/AjaxDataTablePage.java
--
diff --git 
a/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/AjaxDataTablePage.java
 
b/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/AjaxDataTablePage.java
index af14345..b82a514 100644
--- 
a/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/AjaxDataTablePage.java
+++ 
b/wicket-examples/src/main/java/org/apache/wicket/examples/repeater/AjaxDataTablePage.java
@@ -39,9 +39,9 @@ public class AjaxDataTablePage extends BasePage
 */
public AjaxDataTablePage()
{
-   ListIColumnContact, String columns = new 
ArrayListIColumnContact, String();
+   ListIColumnContact, String columns = new ArrayList();
 
-   columns.add(new AbstractColumnContact, String(new 
ModelString(Actions))
+   columns.add(new AbstractColumnContact, 
String(Model.of(Actions))
{
@Override
public void populateItem(ItemICellPopulatorContact 
cellItem, String componentId,
@@ -51,15 +51,15 @@ public class AjaxDataTablePage extends BasePage
}
});
 
-   columns.add(new PropertyColumnContact, String(new 
ModelString(ID), id));
-   columns.add(new PropertyColumnContact, String(new 
ModelString(First Name), firstName,
+   columns.add(new PropertyColumnContact, String(Model.of(ID), 
id));
+   columns.add(new PropertyColumnContact, String(Model.of(First 
Name), firstName,
firstName));
-   columns.add(new PropertyColumnContact, String(new 
ModelString(Last Name), lastName,
+   columns.add(new PropertyColumnContact, String(Model.of(Last 
Name), lastName,
lastName));
-   columns.add(new PropertyColumnContact, String(new 
ModelString(Home Phone), homePhone));
-   columns.add(new PropertyColumnContact, String(new 
ModelString(Cell Phone), cellPhone));
+   columns.add(new PropertyColumnContact, String(Model.of(Home 
Phone), homePhone));
+   columns.add(new PropertyColumnContact, String(Model.of(Cell 
Phone), cellPhone));
 
-   add(new AjaxFallbackDefaultDataTableContact, String(table, 
columns,
+   add(new AjaxFallbackDefaultDataTable(table, columns,
new SortableContactDataProvider(), 8));
}
 }



[2/3] git commit: Java 1.7 - diamonds operator

2013-05-22 Thread mgrigorov
Java 1.7 - diamonds operator


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/66375f6c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/66375f6c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/66375f6c

Branch: refs/heads/master
Commit: 66375f6c4ad9a1e865282d7ea9e688fa539e2c41
Parents: 92629fd
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Fri May 17 10:59:06 2013 +0300
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Fri May 17 10:59:06 2013 +0300

--
 .../servlet/MultipartServletWebRequestImpl.java|8 
 1 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/66375f6c/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequestImpl.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequestImpl.java
 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequestImpl.java
index 4e96e4b..88f5622 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequestImpl.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequestImpl.java
@@ -119,7 +119,7 @@ public class MultipartServletWebRequestImpl extends 
MultipartServletWebRequest
Args.notNull(upload, upload);
this.upload = upload;
parameters = new ValueMap();
-   files = new HashMapString, ListFileItem();
+   files = new HashMap();
 
// Check that request is multipart
final boolean isMultipart = 
ServletFileUpload.isMultipartContent(request);
@@ -214,7 +214,7 @@ public class MultipartServletWebRequestImpl extends 
MultipartServletWebRequest
ListFileItem fileItems = 
files.get(item.getFieldName());
if (fileItems == null)
{
-   fileItems = new ArrayListFileItem();
+   fileItems = new ArrayList();
files.put(item.getFieldName(), 
fileItems);
}
// Add to file list
@@ -277,13 +277,13 @@ public class MultipartServletWebRequestImpl extends 
MultipartServletWebRequest
@Override
protected MapString, ListStringValue generatePostParameters()
{
-   MapString, ListStringValue res = new HashMapString, 
ListStringValue();
+   MapString, ListStringValue res = new HashMap();
for (String key : parameters.keySet())
{
String[] val = (String[])parameters.get(key);
if (val != null  val.length  0)
{
-   ListStringValue items = new 
ArrayListStringValue();
+   ListStringValue items = new ArrayList();
for (String s : val)
{
items.add(StringValue.valueOf(s));



[3/3] git commit: WICKET-5197 Rename AjaxRequestAttributes#allowDefault to #preventDefault

2013-05-22 Thread mgrigorov
WICKET-5197 Rename AjaxRequestAttributes#allowDefault to #preventDefault


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/548e63ef
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/548e63ef
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/548e63ef

Branch: refs/heads/master
Commit: 548e63efa516a574dee06c9f384847d84ed79e09
Parents: 66375f6
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Authored: Wed May 22 15:59:12 2013 +0300
Committer: Martin Tzvetanov Grigorov mgrigo...@apache.org
Committed: Wed May 22 15:59:12 2013 +0300

--
 .../wicket/ajax/AbstractDefaultAjaxBehavior.java   |4 +-
 .../wicket/ajax/attributes/AjaxAttributeName.java  |4 +-
 .../ajax/attributes/AjaxRequestAttributes.java |   18 +++---
 .../form/AjaxFormComponentUpdatingBehavior.java|1 -
 .../wicket/ajax/markup/html/AjaxFallbackLink.java  |1 +
 .../ajax/markup/html/form/AjaxFallbackButton.java  |1 +
 .../wicket/ajax/res/js/wicket-ajax-jquery.js   |4 +-
 .../ajax/AjaxHeaderContributionPage2_expected.html |2 +-
 .../ajax/AjaxHeaderContributionPage_expected.html  |2 +-
 .../ajax/DomReadyOrderPage_ajax_expected.html  |2 +-
 .../wicket/ajax/DomReadyOrderPage_expected.html|2 +-
 .../ajax/attributes/AjaxAttributeNameTest.java |   13 +-
 .../ajax/form/AjaxFormSubmitTestPage_expected.html |2 +-
 .../OnChangeAjaxBehaviorTestPage_expected.html |4 +-
 .../data/sort/AjaxFallbackOrderByLink.java |1 +
 15 files changed, 31 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/548e63ef/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
index 1cd9ec6..30e177b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/AbstractDefaultAjaxBehavior.java
@@ -340,9 +340,9 @@ public abstract class AbstractDefaultAjaxBehavior extends 
AbstractAjaxBehavior

attributesJson.put(AjaxAttributeName.CHANNEL.jsonName(), channel);
}
 
-   if (attributes.isAllowDefault())
+   if (attributes.isPreventDefault())
{
-   
attributesJson.put(AjaxAttributeName.IS_ALLOW_DEFAULT.jsonName(), true);
+   
attributesJson.put(AjaxAttributeName.IS_PREVENT_DEFAULT.jsonName(), true);
}
 
if 
(AjaxRequestAttributes.EventPropagation.BUBBLE.equals(attributes.getEventPropagation()))

http://git-wip-us.apache.org/repos/asf/wicket/blob/548e63ef/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
index 1042deb..e0ce088 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxAttributeName.java
@@ -78,9 +78,9 @@ public enum AjaxAttributeName {
/**
 * allow default
 * 
-* @see AjaxRequestAttributes#isAllowDefault()
+* @see AjaxRequestAttributes#isPreventDefault()
 */
-   IS_ALLOW_DEFAULT(ad),
+   IS_PREVENT_DEFAULT(pd),
 
/**
 * stop propagation

http://git-wip-us.apache.org/repos/asf/wicket/blob/548e63ef/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
 
b/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
index 896c4fd..676c907 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java
@@ -80,7 +80,7 @@ public final class AjaxRequestAttributes
 
private Duration requestTimeout;
 
-   private boolean allowDefault = false;
+   private boolean preventDefault = false;
 
private EventPropagation eventPropagation = EventPropagation.STOP;
 
@@ -291,16 +291,16 @@ public final class 

[CONF] Apache Wicket Migration to Wicket 7.0

2013-05-22 Thread confluence







Migration to Wicket 7.0
Page edited by Martin Grigorov


Comment:
Add notes to the change of allowDefault Ajax attribute


 Changes (2)
 




...
This method now accepts IValidationError as an argument and returns IValidationError. This way it can be used with other IValidationError implementations like RawValidationError for example.  
h5. org.apache.wicket.ajax.attributes.AjaxRequestAttributes#setAllowDefault is renamed to #setPreventDefault [WICKET-5197|https://issues.apache.org/jira/browse/WICKET-5197] This is done to make it more consistent with _javascript_ API.  
h3. Behavior changes  
...
The css class is now only applied to the li element and not to the span inside. Additionally a FeedbackPanel#newMessageItem() method has been added to allow customization of each feedback message item (similar to DataTable#newRowItem()).  
h5. AjaxEventBehavior doesnt prevent the default behavior of the _javascript_ event [WICKET-5197|https://issues.apache.org/jira/browse/WICKET-5197] From now on only AjaxFallback** components prevent the default _javascript_ event behavior so only the Ajax call is made when _javascript_ is enabled in the browser. If the default behavior should be prevented in any use case then use:  {code:borderStyle=solid} attributes.setPreventDefault(true); {code}
h3. Dependency updates  
...


Full Content

Migrating to Wicket 7.0



Environment

Wicket 7.0 requires at least Java 7
Wicket 7.0 requires Servlet 3.0

The HTTP response is not flushed automatically when the request is started in asynchronous mode. WICKET-5152


API changes


org/apache/wicket/core/util/io/SerializableChecker is replaced with org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream WICKET-4817
org/apache/wicket/markup/html/border/BoxBorder is removed with no replacement WICKET-4966.
org.apache.wicket.Component#renderHead(HtmlHeaderContainer) is renamed to Component#internalRenderHead(HtmlHeaderContainer) WICKET-4964
org.apache.wicket.request.resource.ResourceReference#getDependencies() now returns a mutable ListHeaderItem WICKET-5124
org.apache.wicket.model.StringResourceModel constructor accepts IModelString for its default value WICKET-4972
org.apache.wicket.extensions.validation.validator.+Xyz+Validator#decorate() now works with IValidationError WICKET-5174
org.apache.wicket.ajax.attributes.AjaxRequestAttributes#setAllowDefault is renamed to #setPreventDefault WICKET-5197


Behavior changes


org.apache.wicket.request.Url#getQueryString WICKET-4664
org.apache.wicket.request.http.WebResponse encodes the value of the "filename" in Content-Disposition header WICKET-4934
org.apache.wicket.markup.html.form.FormComponentLabel outputs "required", "disabled" and "error" classes when its form component is either required, disabled or invalid. WICKET-5177
org.apache.wicket.markup.html.panel.FeedbackPanel Do not set CSS class on the li  span element for a feedback message WICKET-4831
AjaxEventBehavior doesn't prevent the default behavior of the _javascript_ event WICKET-5197


Dependency updates


Environment

Wicket 7.0 requires at least Java 7

Wicket 7.0 requires Servlet 3.0

The HTTP response is not flushed automatically when the request is started in asynchronous mode. WICKET-5152
This is an improvement in Wicket 7.0 which should not affect any application migrating from Wicket 6.x. But if you use Servlet 3.0's AsyncContext in IResource in Wicket 7 then make sure that your code flushes the http response after completing the request.

API changes

org/apache/wicket/core/util/io/SerializableChecker is replaced with org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream WICKET-4817
CheckingObjectOutputStream accepts a list of org.apache.wicket.core.util.objects.checker.IObjectChecker objects which are used to check for different kind of problems during object serialization. Commit diff: d0441059e0

org/apache/wicket/markup/html/border/BoxBorder is removed with no replacement WICKET-4966.
BoxBorder class has been deprecated in Wicket 6.x series

org.apache.wicket.Component#renderHead(HtmlHeaderContainer) is renamed to Component#internalRenderHead(HtmlHeaderContainer) WICKET-4964
Component#renderHead(HtmlHeaderContainer) was very similar to the usually used Component#renderHead(IHeaderResponse). So it has been renamed to avoid any confusions.

org.apache.wicket.request.resource.ResourceReference#getDependencies() now returns a mutable ListHeaderItem WICKET-5124
The old API returned Iterable? extends HeaderItem and was inconvenient to override and add additional dependencies.
With the 

[jira] [Resolved] (WICKET-5197) Rename AjaxRequestAttributes#allowDefault to #preventDefault

2013-05-22 Thread Martin Grigorov (JIRA)

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

Martin Grigorov resolved WICKET-5197.
-

Resolution: Fixed

 Rename AjaxRequestAttributes#allowDefault to #preventDefault
 

 Key: WICKET-5197
 URL: https://issues.apache.org/jira/browse/WICKET-5197
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 7.0.0
Reporter: Martin Grigorov
Assignee: Martin Grigorov
Priority: Minor
 Fix For: 7.0.0


 Rename AjaxRequestAttributes#allowDefault to #preventDefault to be in sync 
 with jQuery. 
 Also change the default behavior to be allowed, i.e. by default 
 preventDefault should be false.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (WICKET-5198) Change AjaxRequestAttributes#eventPropagation to BUBBLE

2013-05-22 Thread Sven Meier (JIRA)
Sven Meier created WICKET-5198:
--

 Summary: Change AjaxRequestAttributes#eventPropagation to BUBBLE
 Key: WICKET-5198
 URL: https://issues.apache.org/jira/browse/WICKET-5198
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 7.0.0
Reporter: Sven Meier
Assignee: Sven Meier
Priority: Minor
 Fix For: 7.0.0


AjaxRequestAttributes#eventPropagation should initially be set to BUBBLE to be 
consistent with jquery.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: WICKET-5197 Rename AjaxRequestAttributes#allowDefault to #preventDefault

2013-05-22 Thread svenmeier
Updated Branches:
  refs/heads/master 548e63efa - c029a4c8d


WICKET-5197 Rename AjaxRequestAttributes#allowDefault to #preventDefault

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/c029a4c8
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/c029a4c8
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/c029a4c8

Branch: refs/heads/master
Commit: c029a4c8d129881cc7ca084a1736b8437741e51a
Parents: 548e63e
Author: svenmeier s...@meiers.net
Authored: Wed May 22 16:52:52 2013 +0200
Committer: svenmeier s...@meiers.net
Committed: Wed May 22 16:52:52 2013 +0200

--
 .../wicket/ajax/res/js/wicket-ajax-jquery.js   |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/c029a4c8/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index eb9827b..9fe2d37 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -1755,7 +1755,7 @@
_handleEventCancelation: function(attrs) {
var evt = attrs.event;
if (evt) {
-   if (!attrs.ad) {
+   if (attrs.pd) {
try {
evt.preventDefault();
} catch (ignore) {



[jira] [Resolved] (WICKET-5198) Change AjaxRequestAttributes#eventPropagation to BUBBLE

2013-05-22 Thread Sven Meier (JIRA)

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

Sven Meier resolved WICKET-5198.


Resolution: Fixed

now BUBBLE by default

 Change AjaxRequestAttributes#eventPropagation to BUBBLE
 ---

 Key: WICKET-5198
 URL: https://issues.apache.org/jira/browse/WICKET-5198
 Project: Wicket
  Issue Type: Improvement
  Components: wicket
Affects Versions: 7.0.0
Reporter: Sven Meier
Assignee: Sven Meier
Priority: Minor
 Fix For: 7.0.0


 AjaxRequestAttributes#eventPropagation should initially be set to BUBBLE to 
 be consistent with jquery.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[CONF] Apache Wicket Migration to Wicket 7.0

2013-05-22 Thread confluence







Migration to Wicket 7.0
Page edited by Sven Meier


Comment:
WICKET-5198 eventPropagation


 Changes (2)
 




...
This is done to make it more consistent with _javascript_ API.  
h5. org.apache.wicket.ajax.attributes.AjaxRequestAttributes#eventPropagation is now BUBBLE by default [WICKET-5198|https://issues.apache.org/jira/browse/WICKET-5198] This is done to make it more consistent with _javascript_ API.  
h3. Behavior changes  
...
{code}  
h5. Ajax behaviors let _javascript_ events bubble by default [WICKET-5198|https://issues.apache.org/jira/browse/WICKET-5198] If _javascript_ events should not bubble then use:  {code:borderStyle=solid} attributes.setEventPropagation(EventPropagation.STOP); {code} or: {code:borderStyle=solid} attributes.setEventPropagation(EventPropagation.STOP_IMMEDIATE); {code} 
  
...


Full Content

Migrating to Wicket 7.0



Environment

Wicket 7.0 requires at least Java 7
Wicket 7.0 requires Servlet 3.0

The HTTP response is not flushed automatically when the request is started in asynchronous mode. WICKET-5152


API changes


org/apache/wicket/core/util/io/SerializableChecker is replaced with org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream WICKET-4817
org/apache/wicket/markup/html/border/BoxBorder is removed with no replacement WICKET-4966.
org.apache.wicket.Component#renderHead(HtmlHeaderContainer) is renamed to Component#internalRenderHead(HtmlHeaderContainer) WICKET-4964
org.apache.wicket.request.resource.ResourceReference#getDependencies() now returns a mutable ListHeaderItem WICKET-5124
org.apache.wicket.model.StringResourceModel constructor accepts IModelString for its default value WICKET-4972
org.apache.wicket.extensions.validation.validator.+Xyz+Validator#decorate() now works with IValidationError WICKET-5174
org.apache.wicket.ajax.attributes.AjaxRequestAttributes#setAllowDefault is renamed to #setPreventDefault WICKET-5197
org.apache.wicket.ajax.attributes.AjaxRequestAttributes#eventPropagation is now BUBBLE by default WICKET-5198


Behavior changes


org.apache.wicket.request.Url#getQueryString WICKET-4664
org.apache.wicket.request.http.WebResponse encodes the value of the "filename" in Content-Disposition header WICKET-4934
org.apache.wicket.markup.html.form.FormComponentLabel outputs "required", "disabled" and "error" classes when its form component is either required, disabled or invalid. WICKET-5177
org.apache.wicket.markup.html.panel.FeedbackPanel Do not set CSS class on the li  span element for a feedback message WICKET-4831
AjaxEventBehavior doesn't prevent the default behavior of the _javascript_ event WICKET-5197
Ajax behaviors let _javascript_ events bubble by default WICKET-5198


Dependency updates


Environment

Wicket 7.0 requires at least Java 7

Wicket 7.0 requires Servlet 3.0

The HTTP response is not flushed automatically when the request is started in asynchronous mode. WICKET-5152
This is an improvement in Wicket 7.0 which should not affect any application migrating from Wicket 6.x. But if you use Servlet 3.0's AsyncContext in IResource in Wicket 7 then make sure that your code flushes the http response after completing the request.

API changes

org/apache/wicket/core/util/io/SerializableChecker is replaced with org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream WICKET-4817
CheckingObjectOutputStream accepts a list of org.apache.wicket.core.util.objects.checker.IObjectChecker objects which are used to check for different kind of problems during object serialization. Commit diff: d0441059e0

org/apache/wicket/markup/html/border/BoxBorder is removed with no replacement WICKET-4966.
BoxBorder class has been deprecated in Wicket 6.x series

org.apache.wicket.Component#renderHead(HtmlHeaderContainer) is renamed to Component#internalRenderHead(HtmlHeaderContainer) WICKET-4964
Component#renderHead(HtmlHeaderContainer) was very similar to the usually used Component#renderHead(IHeaderResponse). So it has been renamed to avoid any confusions.

org.apache.wicket.request.resource.ResourceReference#getDependencies() now returns a mutable ListHeaderItem WICKET-5124
The old API returned Iterable? extends HeaderItem and was inconvenient to override and add additional dependencies.
With the new API it is as easy as:

MyResourceReference.java

@Override
public ListHeaderItem getDependencies() {
  ListHeaderItem dependencies = super.getDependencies();
  dependencies.add(dep1);
  dependencies.add(dep2);
  return dependencies;
}



The same is done for org.apache.wicket.markup.head.HeaderItem#getDependencies() 

[jira] [Updated] (WICKET-5196) Make AjaxFormValidatingBehavior non-static

2013-05-22 Thread Martin Grigorov (JIRA)

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

Martin Grigorov updated WICKET-5196:


Attachment: WICKET-5196.patch

A patch that makes AjaxFormValidatingBehavior non-static.

Further improvement could be to allow to bind it only to a Form component

 Make AjaxFormValidatingBehavior non-static
 --

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

 Attachments: WICKET-5196.patch


 Rework AjaxFormValidatingBehavior to not use static method to do its job.
 It can be added to a Form component as any other (Ajax)Behavior + a check in 
 #onBind() that it is used with a Form or use #findParent(Form.class).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira