svn commit: r797143 - /wicket/sandbox/ivaynberg/1.3.7/
Author: ivaynberg Date: Thu Jul 23 16:52:13 2009 New Revision: 797143 URL: http://svn.apache.org/viewvc?rev=797143&view=rev Log: rebuilding 1.3.7 Removed: wicket/sandbox/ivaynberg/1.3.7/
svn commit: r797144 - /wicket/sandbox/ivaynberg/1.3.7/
Author: ivaynberg Date: Thu Jul 23 16:53:23 2009 New Revision: 797144 URL: http://svn.apache.org/viewvc?rev=797144&view=rev Log: rebuilding 1.3.7 Added: wicket/sandbox/ivaynberg/1.3.7/ - copied from r797143, wicket/branches/wicket-1.3.x/
svn commit: r797149 - in /wicket/sandbox/ivaynberg/1.3.7: ./ archetypes/quickstart/ archetypes/quickstart/src/main/resources/archetype-resources/ jdk-1.4/ jdk-1.4/wicket-datetime/ jdk-1.4/wicket-exten
Author: ivaynberg Date: Thu Jul 23 17:08:04 2009 New Revision: 797149 URL: http://svn.apache.org/viewvc?rev=797149&view=rev Log: rebuilding 1.3.7 Modified: wicket/sandbox/ivaynberg/1.3.7/CHANGELOG-1.3 wicket/sandbox/ivaynberg/1.3.7/NOTICE wicket/sandbox/ivaynberg/1.3.7/archetypes/quickstart/pom.xml wicket/sandbox/ivaynberg/1.3.7/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.4/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.4/wicket-datetime/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.4/wicket-extensions/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.4/wicket-ioc/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.4/wicket-quickstart/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.4/wicket-spring/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.4/wicket-velocity/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.4/wicket/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.5/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.5/wicket-auth-roles/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.5/wicket-examples/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.5/wicket-guice/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.5/wicket-jmx/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.5/wicket-objectssizeof-agent/pom.xml wicket/sandbox/ivaynberg/1.3.7/jdk-1.5/wicket-spring-annot/pom.xml wicket/sandbox/ivaynberg/1.3.7/pom.xml wicket/sandbox/ivaynberg/1.3.7/testing/wicket-threadtest/pom.xml Modified: wicket/sandbox/ivaynberg/1.3.7/CHANGELOG-1.3 URL: http://svn.apache.org/viewvc/wicket/sandbox/ivaynberg/1.3.7/CHANGELOG-1.3?rev=797149&r1=797148&r2=797149&view=diff == --- wicket/sandbox/ivaynberg/1.3.7/CHANGELOG-1.3 (original) +++ wicket/sandbox/ivaynberg/1.3.7/CHANGELOG-1.3 Thu Jul 23 17:08:04 2009 @@ -1,5 +1,98 @@ This file contains the changes done to the 1.3.x releases since 1.3-final. +Release Notes - Wicket - Version 1.3.7 + +** Bug +* [WICKET-1912] - StatelessForm problems with query string +* [WICKET-1922] - AbstractTree - setting root to null causes NullPointerException +* [WICKET-1960] - AutoCompleteTextField - gives a type mismatch error on IE - version wicket-1.4-rc1 +* [WICKET-1992] - SharedResourceRequestTarget allows access to almost arbitrary files under WEB-INF. +* [WICKET-2215] - WebClientInfo does not set browerMajorVersion for IE8 +* [WICKET-2252] - Autocomplete text fields don't call existing JavaScript event handlers properly +* [WICKET-2268] - NullPointerException NPE in DiskPageStore after Session Timeout +* [WICKET-2289] - AutoCompleteBehavior: Selected input not modiefied when selected with keyboard +* [WICKET-2308] - Append lastmodified to Resources shouldnt append when the resource is a directory (ends with /) +* [WICKET-2313] - BaseWicketTester doesn't invoke Application.newAjaxRequestTarget for ajax request target +* [WICKET-2337] - IndexOutOfBoundsException when PropertyResolver is using an invalid list index +* [WICKET-2354] - PropertyModel does not support index only property ("[0]") +* [WICKET-2371] - jre 1.5 method used in wicket-extensions +* [WICKET-2384] - OutOfMemoryError occur for memory leak on FeedbackPanel & FeedbackMessages +* [WICKET-2385] - BigDecimalConverter uses jdk5 + +** Improvement +* [WICKET-2168] - TableTree.html is not XHTML valid +* [WICKET-2315] - Backport PageReference from trunk + + +Release Notes - Wicket - Version 1.3.6 + +** Bug +* [WICKET-693] - What to do with the wicket dtd? +* [WICKET-1403] - Reinjection fails after Server restart +* [WICKET-1483] - Unusual ClassCastException (SimpleAttributeModifier to IBehaviorListener) processing onError. +* [WICKET-1504] - AutoCompleteTextField - javascript error "type mismatch" in line 227 in IE +* [WICKET-1567] - AutoLinkResolver does not work with Internal link +* [WICKET-1605] - onclick is null or not an object in IE6, IE7; Form.appendDefaultButtonField +* [WICKET-1619] - PagingNavigator.setEnabled(false) doesn't work +* [WICKET-1623] - LinkTree with IndicatingAjaxLink leaks
svn commit: r797154 - /wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java
Author: ivaynberg Date: Thu Jul 23 17:28:38 2009 New Revision: 797154 URL: http://svn.apache.org/viewvc?rev=797154&view=rev Log: WICKET-2394 Modified: wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Modified: wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java URL: http://svn.apache.org/viewvc/wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java?rev=797154&r1=797153&r2=797154&view=diff == --- wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java (original) +++ wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Thu Jul 23 17:28:38 2009 @@ -170,7 +170,7 @@ // ajax request passing in mouse co-ordinates return generateCallbackScript("showLoadingIndicator(); wicketAjaxGet('" + getCallbackUrl(onlyTargetActivePage) + - "&x=' + getEventX(this, event) + '&y=' + getEventY(this, event)"); + "&x=' + getEventX(this, event) + '&y=' + getEventY(this, event)"); } @SuppressWarnings("unchecked")
svn commit: r797160 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java
Author: ivaynberg Date: Thu Jul 23 17:36:47 2009 New Revision: 797160 URL: http://svn.apache.org/viewvc?rev=797160&view=rev Log: WICKET-2394 KittenCaptcha example broken Issue: WICKET-2394 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java?rev=797160&r1=797159&r2=797160&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Thu Jul 23 17:36:47 2009 @@ -170,7 +170,7 @@ // ajax request passing in mouse co-ordinates return generateCallbackScript("showLoadingIndicator(); wicketAjaxGet('" + getCallbackUrl(onlyTargetActivePage) + - "&x=' + getEventX(this, event) + '&y=' + getEventY(this, event)"); + "&x=' + getEventX(this, event) + '&y=' + getEventY(this, event)"); } @SuppressWarnings("unchecked")
svn commit: r797164 - /wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java
Author: ivaynberg Date: Thu Jul 23 17:42:04 2009 New Revision: 797164 URL: http://svn.apache.org/viewvc?rev=797164&view=rev Log: WICKET-2394 Modified: wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Modified: wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java URL: http://svn.apache.org/viewvc/wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java?rev=797164&r1=797163&r2=797164&view=diff == --- wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java (original) +++ wicket/sandbox/ivaynberg/wicket-1.4.0/wicket-extensions/src/main/java/org/apache/wicket/extensions/captcha/kittens/KittenCaptchaPanel.java Thu Jul 23 17:42:04 2009 @@ -170,7 +170,7 @@ // ajax request passing in mouse co-ordinates return generateCallbackScript("showLoadingIndicator(); wicketAjaxGet('" + getCallbackUrl(onlyTargetActivePage) + - "&x=' + getEventX(this, event) + '&y=' + getEventY(this, event)"); + "&x=' + getEventX(this, event) + '&y=' + getEventY(this, event)"); } @SuppressWarnings("unchecked")
svn commit: r797166 - /wicket/sandbox/ivaynberg/wicket-1.4.0/CHANGELOG-1.4
Author: ivaynberg Date: Thu Jul 23 17:43:06 2009 New Revision: 797166 URL: http://svn.apache.org/viewvc?rev=797166&view=rev Log: added WICKET-2394 to release Modified: wicket/sandbox/ivaynberg/wicket-1.4.0/CHANGELOG-1.4 Modified: wicket/sandbox/ivaynberg/wicket-1.4.0/CHANGELOG-1.4 URL: http://svn.apache.org/viewvc/wicket/sandbox/ivaynberg/wicket-1.4.0/CHANGELOG-1.4?rev=797166&r1=797165&r2=797166&view=diff == --- wicket/sandbox/ivaynberg/wicket-1.4.0/CHANGELOG-1.4 (original) +++ wicket/sandbox/ivaynberg/wicket-1.4.0/CHANGELOG-1.4 Thu Jul 23 17:43:06 2009 @@ -14,6 +14,7 @@ * [WICKET-2386] - JavaDoc: Some JavDoc examples still refer to WicketServlet * [WICKET-2391] - Tag ''has a mismatched close tag at '' * [WICKET-2392] - MarkupComponentBorder fails to close stream (?) +* [WICKET-2394] - KittenCaptcha example broken ** Improvement * [WICKET-2362] - Update hungarian localization
svn commit: r797177 - in /wicket/sandbox/ivaynberg: 1.3.7/ wicket-1.3.7/
Author: ivaynberg Date: Thu Jul 23 18:22:30 2009 New Revision: 797177 URL: http://svn.apache.org/viewvc?rev=797177&view=rev Log: renaming Added: wicket/sandbox/ivaynberg/wicket-1.3.7/ - copied from r797176, wicket/sandbox/ivaynberg/1.3.7/ Removed: wicket/sandbox/ivaynberg/1.3.7/
svn commit: r800174 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java
Author: ivaynberg Date: Mon Aug 3 00:17:01 2009 New Revision: 800174 URL: http://svn.apache.org/viewvc?rev=800174&view=rev Log: WICKET-2407 AbstractOptions of Palette may cause an HTML error with illegal chars Issue: WICKET-2407 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java?rev=800174&r1=800173&r2=800174&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/component/AbstractOptions.java Mon Aug 3 00:17:01 2009 @@ -26,6 +26,7 @@ import org.apache.wicket.markup.html.form.IChoiceRenderer; import org.apache.wicket.util.string.AppendingStringBuffer; import org.apache.wicket.util.string.JavascriptUtils; +import org.apache.wicket.util.string.Strings; import org.apache.wicket.util.value.IValueMap; @@ -74,11 +75,40 @@ while (options.hasNext()) { final T choice = options.next(); - String id = renderer.getIdValue(choice, 0); - Object displayValue = renderer.getDisplayValue(choice); - Class displayClass = displayValue == null ? null : displayValue.getClass(); - String value = getConverter(displayClass).convertToString(displayValue, getLocale()); - value = getLocalizer().getString(value, this, value); + + + final CharSequence id; + { + String value = renderer.getIdValue(choice, 0); + + if (getEscapeModelStrings()) + { + id = Strings.escapeMarkup(value); + } + else + { + id = value; + } + } + + final CharSequence value; + { + Object displayValue = renderer.getDisplayValue(choice); + Class displayClass = displayValue == null ? null : displayValue.getClass(); + + String displayString = getConverter(displayClass).convertToString(displayValue, + getLocale()); + displayString = getLocalizer().getString(displayString, this, displayString); + + if (getEscapeModelStrings()) + { + value = Strings.escapeMarkup(displayString); + } + else + { + value = displayString; + } + } buffer.append("\n
svn commit: r800467 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket: Application.java markup/html/EmptySrcAttributeCheckFilter.java
Author: ivaynberg Date: Mon Aug 3 17:09:06 2009 New Revision: 800467 URL: http://svn.apache.org/viewvc?rev=800467&view=rev Log: WICKET-2412 EmptySrcAttributeFilter Issue: WICKET-2412 Added: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/EmptySrcAttributeCheckFilter.java (with props) Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java?rev=800467&r1=800466&r2=800467&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Application.java Mon Aug 3 17:09:06 2009 @@ -33,6 +33,7 @@ import org.apache.wicket.application.IComponentOnBeforeRenderListener; import org.apache.wicket.javascript.DefaultJavascriptCompressor; import org.apache.wicket.markup.IMarkupCache; +import org.apache.wicket.markup.html.EmptySrcAttributeCheckFilter; import org.apache.wicket.markup.html.IHeaderContributor; import org.apache.wicket.markup.html.IHeaderResponse; import org.apache.wicket.markup.html.image.resource.DefaultButtonImageResourceFactory; @@ -348,6 +349,8 @@ getDebugSettings().setDevelopmentUtilitiesEnabled(true); // getDebugSettings().setOutputMarkupContainerClassName(true); getResourceSettings().setJavascriptCompressor(null); + getRequestCycleSettings().addResponseFilter( + EmptySrcAttributeCheckFilter.INSTANCE); } else if (DEPLOYMENT.equalsIgnoreCase(configurationType)) { Added: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/EmptySrcAttributeCheckFilter.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/EmptySrcAttributeCheckFilter.java?rev=800467&view=auto == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/EmptySrcAttributeCheckFilter.java (added) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/EmptySrcAttributeCheckFilter.java Mon Aug 3 17:09:06 2009 @@ -0,0 +1,64 @@ +/* + * 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. + */ +package org.apache.wicket.markup.html; + +import org.apache.wicket.IResponseFilter; +import org.apache.wicket.util.string.AppendingStringBuffer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * The EmptySrcAttributeFilter checks if an empty src attribute is found in the response. + * + * Empty src attribute is problematic as it makes some browsers, i.e. firefox, request an URL twice. + * Two issues arise: + * + * 1. Unnecessary server load. + * + * 2. If the browser only renders the first response, some links in the page might be broken as + * wicket rerendered them in the second request and dropped the ones rendered in the first request. + */ +public class EmptySrcAttributeCheckFilter implements IResponseFilter +{ + private static final Logger log = LoggerFactory.getLogger(EmptySrcAttributeCheckFilter.class); + + /** +* Indicates that an empty src attribute is found in the response. +*/ + public static final EmptySrcAttributeCheckFilter INSTANCE = new EmptySrcAttributeCheckFilter(); + + /** +* @see org.apache.wicket.IResponseFilter#filter(AppendingStringBuffer) +*/ + public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer) + { + int pos = responseBuffer.indexOf("src=\"\""); + if (pos < 0) + { + pos = responseBuffer.indexOf("src=''"); + } + if (pos >= 0) + { + log.warn("Empty src attribute found in response:"); +
svn commit: r800470 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/WicketSessionFilter.java
Author: ivaynberg Date: Mon Aug 3 17:29:30 2009 New Revision: 800470 URL: http://svn.apache.org/viewvc?rev=800470&view=rev Log: WICKET-2413 better exception handling for WicketSessionFilter Issue: WICKET-2413 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/WicketSessionFilter.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/WicketSessionFilter.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/WicketSessionFilter.java?rev=800470&r1=800469&r2=800470&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/WicketSessionFilter.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/WicketSessionFilter.java Mon Aug 3 17:29:30 2009 @@ -151,6 +151,14 @@ if (sessionKey == null) { WebApplication application = (WebApplication)Application.get(filterName); + if (application == null) + { + throw new IllegalStateException( + "Could not find wicket application mapped to filter: " + + filterName + + ". Make sure you set filterName attribute to the name of the wicket filter " + + "for the wicket application whose session you want to access."); + } sessionKey = application.getSessionAttributePrefix(null, filterName) + Session.SESSION_ATTRIBUTE_NAME;
svn commit: r801321 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/ResourceReference.java
Author: ivaynberg Date: Wed Aug 5 17:23:57 2009 New Revision: 801321 URL: http://svn.apache.org/viewvc?rev=801321&view=rev Log: WICKET-2418 NPE in ResourceReference Issue: WICKET-2418 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ResourceReference.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ResourceReference.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ResourceReference.java?rev=801321&r1=801320&r2=801321&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ResourceReference.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ResourceReference.java Wed Aug 5 17:23:57 2009 @@ -151,10 +151,10 @@ // still null? try to see whether it is a package // resource that should // be lazily loaded - PackageResource packageResource = PackageResource.get(getScope(), name); + resource = PackageResource.get(getScope(), name); // will throw an exception if not found, so if we come // here, it was found - sharedResources.add(name, packageResource); + sharedResources.add(name, resource); } }
svn commit: r801491 - /wicket/sandbox/ivaynberg/wicket-ajax-multipart/
Author: ivaynberg Date: Thu Aug 6 01:32:55 2009 New Revision: 801491 URL: http://svn.apache.org/viewvc?rev=801491&view=rev Log: toy branch of core only Added: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ (props changed) - copied from r801490, wicket/trunk/wicket/ Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- bugtraq:append = true Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- bugtraq:label = Jira Issue: Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- bugtraq:message = Issue: WICKET-%BUGID% Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- bugtraq:number = true Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- bugtraq:url = https://issues.apache.org/jira/browse/WICKET-%BUGID% Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- bugtraq:warnifnoissue = false Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- --- subclipse:tags (added) +++ subclipse:tags Thu Aug 6 01:32:55 2009 @@ -0,0 +1,35 @@ +461967,wicket-1.2.2,/wicket/tags/wicket-1.2.2,tag +461976,wicket-1.1,/wicket/tags/wicket-1.1,tag +461979,wicket-1.0.1,/wicket/tags/wicket-1.0.1,tag +461980,wicket-1.0.2,/wicket/tags/wicket-1.0.2,tag +461981,wicket-1.0.3,/wicket/tags/wicket-1.0.3,tag +461982,wicket-1.2,/wicket/tags/wicket-1.2,tag +468889,wicket-1.2.3,/wicket/tags/wicket-1.2.3,tag +490025,wicket-1.2.4,/wicket/tags/wicket-1.2.4,tag +505658,wicket-1.2.5,/wicket/tags/wicket-1.2.5,tag +531163,wicket-1.2.6,/wicket/tags/wicket-1.2.6,tag +550610,wicket-1.3.0-beta2,/wicket/tags/wicket-1.3.0-beta2,tag +567792,wicket-1.3.0-beta3,/wicket/tags/wicket-1.3.0-beta3,tag +582590,wicket-1.3.0-beta4,/wicket/tags/wicket-1.3.0-beta4,tag +591745,wicket-1.3.0-rc1,/wicket/tags/wicket-1.3.0-rc1,tag +601799,wicket-1.3.0-rc2,/wicket/tags/wicket-1.3.0-rc2,tag +607417,wicket-1.3.0,/wicket/tags/wicket-1.3.0,tag +616875,wicket-1.3.1,/wicket/tags/wicket-1.3.1,tag +616875,wicket-1.3.1,/wicket/tags/wicket-1.3.1,tag +635317,wicket-1.3.2,/wicket/tags/wicket-1.3.2,tag +635317,wicket-1.3.2,/wicket/tags/wicket-1.3.2,tag +640179,wicket-1.2.7,/wicket/tags/wicket-1.2.7,tag +644016,wicket-1.3.3,/wicket/tags/wicket-1.3.3,tag +644016,wicket-1.3.3,/wicket/tags/wicket-1.3.3,tag +649950,wicket-1.4-m1,/wicket/tags/wicket-1.4-m1,tag +649950,wicket-1.4-m1,/wicket/tags/wicket-1.4-m1,tag +659868,wicket-1.4-m2,/wicket/tags/wicket-1.4-m2,tag +659868,wicket-1.4-m2,/wicket/tags/wicket-1.4-m2,tag +670351,wicket-1.3.4,/wicket/tags/wicket-1.3.4,tag +670351,wicket-1.3.4,/wicket/tags/wicket-1.3.4,tag +674291,wicket-1.4-m3,/wicket/tags/wicket-1.4-m3,tag +674291,wicket-1.4-m3,/wicket/tags/wicket-1.4-m3,tag +705050,wicket-1.3.5,/wicket/tags/wicket-1.3.5,tag +709865,wicket-1.4-rc1,/wicket/tags/wicket-1.4-rc1,tag +740059,wicket-1.4-rc2,/wicket/tags/wicket-1.4-rc2,tag +768824,wicket-1.4-rc3,/wicket/tags/wicket-1.4-rc3,tag Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- --- svn:ignore (added) +++ svn:ignore Thu Aug 6 01:32:55 2009 @@ -0,0 +1,15 @@ +.classpath +.project +build +target +*.log +build.properties +*.backup +*.temp +RECYCLER +.clover +.amateras +sessions +bin +.classpath-e +.externalToolBuilders Propchange: wicket/sandbox/ivaynberg/wicket-ajax-multipart/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Thu Aug 6 01:32:55 2009 @@ -0,0 +1,3 @@ +/wicket/branches/wicket-1.3.x/jdk-1.4/wicket:653208,653212,653215,653226,653231,654304,655446,655466,655786,658141,658189,659118,659120,662360,663058,671549,671885,687144-688996,698530-698577,701132-701133,701843,701850-701877,704231,708127,722099-722105,726536,728467-728490,731960,734478,739647,739951,745468-745497,749817,755171-755176,759905,760374,764756,769389,769440,774373,781715,781719,790879 +/wicket/sandbox/jthomerson/experimental/wicket-devutils/wicket:760296-760351,760353-760355 +/wicket/trunk/wicket-devutils/wicket:760352
svn commit: r801499 - /wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Thu Aug 6 02:24:14 2009 New Revision: 801499 URL: http://svn.apache.org/viewvc?rev=801499&view=rev Log: WICKET-2420: first pass on multipart ajax support, so far only firefox seems to work ok Issue: WICKET-2420 Modified: wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=801499&r1=801498&r2=801499&view=diff == --- wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Thu Aug 6 02:24:14 2009 @@ -1046,9 +1046,20 @@ return this.request.post(body); }, + // Submits a form using ajax + submitFormById: function(formId, submitButton) { + var form = Wicket.$(formId); + if (form == null || typeof (form) == "undefined") + Wicket.Log.error("Wicket.Ajax.Call.submitFormById: Trying to submit form with id '"+formId+"' that is not in document."); + return this.submitForm(form, submitButton); + }, + // Submits a form using ajax. // This method serializes a form and sends it as POST body. submitForm: function(form, submitButton) { + if (this.handleMultipart(form)) { + return true; + } var body = function() { var s = Wicket.Form.serialize(form); if (submitButton != null) { @@ -1058,13 +1069,59 @@ } return this.request.post(body); }, - - // Submits a form using ajax - submitFormById: function(formId, submitButton) { - var form = Wicket.$(formId); - if (form == null || typeof (form) == "undefined") - Wicket.Log.error("Wicket.Ajax.Call.submitFormById: Trying to submit form with id '"+formId+"' that is not in document."); - return this.submitForm(form, submitButton); + + // If the form contains multipart content this function will post + // the form using an iframe instead of the regular ajax call + // and bridge the output - transparently making this work as if it was an ajax call + handleMultipart: function (form) { + + if (form.enctype!="multipart/form-data") { + // not handled, return false + return false; + } + + var originalFormAction=form.action; + var originalFormTarget=form.target; + + var iframe=document.createElement("iframe"); + + //iframe.style.width="600px"; + //iframe.style.height="300px"; + iframe.style.display="none"; + iframe.style.visibility="hidden"; + + iframe.name="wicket-submit-"+Math.random(); // TODO make sure this is unique + iframe.id=iframe.name; + iframe.onload=this.handleMultipartComplete.bind(this); + + document.body.appendChild(iframe); + + // reconfigure the form + form.target=iframe.name; + form.action=this.request.url; + + //submit the form into the iframe, response will be handled by the onload callback + form.submit(); + + // handled, restore state and return true + form.action=originalFormAction; + form.target=originalFormTarget; + + return true; + }, + + // Completes the multipart ajax handling started via handleMultipart() + handleMultipartComplete: function (event) { + var iframe=event.target; + + // process the response + this.loadedCallback(iframe.contentWindow.document); + + // stop the event + if (event.stopPropagation) { event.stopPropagation(); } else {event.cancelBubble=true;} + + // remove the iframe + document.body.removeChild(iframe); }, // Processes the response
svn commit: r802050 - /wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Fri Aug 7 15:34:58 2009 New Revision: 802050 URL: http://svn.apache.org/viewvc?rev=802050&view=rev Log: WICEKT-2420: multipart ajax now works in firefox, chrome, safari. explorer still pukes. Issue: WICKET-2420 Modified: wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=802050&r1=802049&r2=802050&view=diff == --- wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Fri Aug 7 15:34:58 2009 @@ -1092,7 +1092,9 @@ iframe.name="wicket-submit-"+Math.random(); // TODO make sure this is unique iframe.id=iframe.name; - iframe.onload=this.handleMultipartComplete.bind(this); + iframe.src="about:blank"; + + Wicket.Event.add(iframe, "load", this.handleMultipartComplete.bind(this)); document.body.appendChild(iframe); @@ -1120,8 +1122,14 @@ // stop the event if (event.stopPropagation) { event.stopPropagation(); } else {event.cancelBubble=true;} + // remove the event + if (iframe.detachEvent) + iframe.detachEvent("onload", this.handleMultipartComplete); + else + iframe.removeEventListener("load", this.handleMultipartComplete, false); + // remove the iframe - document.body.removeChild(iframe); + setTimeout(function() { iframe.parentNode.removeChild(iframe); }, 250); }, // Processes the response
svn commit: r802080 - /wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Fri Aug 7 16:31:57 2009 New Revision: 802080 URL: http://svn.apache.org/viewvc?rev=802080&view=rev Log: now works with crappy explorer 8 Issue: WICKET-2420 Modified: wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=802080&r1=802079&r2=802080&view=diff == --- wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Fri Aug 7 16:31:57 2009 @@ -1083,44 +1083,55 @@ var originalFormAction=form.action; var originalFormTarget=form.target; - var iframe=document.createElement("iframe"); + var iframeName="wicket-submit-"+Math.random(); + + var iframe=null; + try { + iframe = document.createElement(""); + } catch (ex) { + iframe = document.createElement("iframe"); + iframe.name=iframeName; + iframe.id=iframe.name; + iframe.src="about:blank"; + } + //iframe.style.width="600px"; //iframe.style.height="300px"; iframe.style.display="none"; iframe.style.visibility="hidden"; - - iframe.name="wicket-submit-"+Math.random(); // TODO make sure this is unique - iframe.id=iframe.name; - iframe.src="about:blank"; - + Wicket.Event.add(iframe, "load", this.handleMultipartComplete.bind(this)); document.body.appendChild(iframe); // reconfigure the form - form.target=iframe.name; - form.action=this.request.url; + form.setAttribute("target",iframe.name); + form.setAttribute("action",this.request.url); //submit the form into the iframe, response will be handled by the onload callback form.submit(); // handled, restore state and return true - form.action=originalFormAction; - form.target=originalFormTarget; + form.setAttribute("action",originalFormAction); + form.setAttribute("target",originalFormTarget); return true; }, // Completes the multipart ajax handling started via handleMultipart() handleMultipartComplete: function (event) { - var iframe=event.target; + if (event==null) { event=window.event; } + if (event.target!=null) { var iframe=event.target; } else { var iframe=event.srcElement}; + var envelope=iframe.contentWindow.document; + if (envelope.XMLDocument!=null) { envelope=envelope.XMLDocument; } + // process the response - this.loadedCallback(iframe.contentWindow.document); + this.loadedCallback(envelope); // stop the event - if (event.stopPropagation) { event.stopPropagation(); } else {event.cancelBubble=true;} + if (event.stopPropagation) { event.stopPropagation(); } else { event.cancelBubble=true; } // remove the event if (iframe.detachEvent)
svn commit: r802084 - /wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Fri Aug 7 16:47:40 2009 New Revision: 802084 URL: http://svn.apache.org/viewvc?rev=802084&view=rev Log: better iframe name Issue: WICKET-2420 Modified: wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=802084&r1=802083&r2=802084&view=diff == --- wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/sandbox/ivaynberg/wicket-ajax-multipart/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Fri Aug 7 16:47:40 2009 @@ -1083,19 +1083,17 @@ var originalFormAction=form.action; var originalFormTarget=form.target; - var iframeName="wicket-submit-"+Math.random(); + var iframeName="wicket-submit-"+(""+Math.random()).substr(2); - var iframe=null; try { - iframe = document.createElement(""); + var iframe = document.createElement(""); } catch (ex) { - iframe = document.createElement("iframe"); + var iframe = document.createElement("iframe"); iframe.name=iframeName; iframe.id=iframe.name; iframe.src="about:blank"; } - //iframe.style.width="600px"; //iframe.style.height="300px"; iframe.style.display="none";
svn commit: r802097 - in /wicket/trunk: wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/ wicket-examples/src/main/java/org/apache/wicket/examples/upload/ wicket/src/main/java/org
Author: ivaynberg Date: Fri Aug 7 17:25:30 2009 New Revision: 802097 URL: http://svn.apache.org/viewvc?rev=802097&view=rev Log: WICKET-2420: ajax handling of multipart forms. fingers crossed, damn javascript Issue: WICKET-2420 Added: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html (with props) wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java (with props) Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/Index.html wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/upload/MultiUploadPage.html wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/upload/UploadPage.html wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java?rev=802097&r1=802096&r2=802097&view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java Fri Aug 7 17:25:30 2009 @@ -69,6 +69,8 @@ mount(new HybridUrlCodingStrategy("tree/simple", SimpleTreePage.class)); mount(new HybridUrlCodingStrategy("tree/table", TreeTablePage.class)); mount(new HybridUrlCodingStrategy("tree/table/editable", EditableTreeTablePage.class)); + mount(new HybridUrlCodingStrategy("upload", FileUploadPage.class)); + } /** Added: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html?rev=802097&view=auto == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html (added) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html Fri Aug 7 17:25:30 2009 @@ -0,0 +1,14 @@ + + +Demonstrates Wicket's ability to transparently handle multipart forms via AJAX.The only difference between this example and other non-AJAX upload examples is the option to trigger the form submit via an AjaxButton, everything else is handled transparently by Wicket. + + + + + + Text field: + File field: (1MB max) + + + + \ No newline at end of file Propchange: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.html -- svn:mime-type = text/plain Added: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java?rev=802097&view=auto == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java (added) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/FileUploadPage.java Fri Aug 7 17:25:30 2009 @@ -0,0 +1,96 @@ +/* + * 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. + */ +package org.apache.wicket.examples.ajax.builtin; + +import org.apache.wicket.Component; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.markup.html.form.AjaxButton; +import org.apache.wi
svn commit: r802101 - /wicket/sandbox/ivaynberg/wicket-ajax-multipart/
Author: ivaynberg Date: Fri Aug 7 17:42:01 2009 New Revision: 802101 URL: http://svn.apache.org/viewvc?rev=802101&view=rev Log: merged into trunk Removed: wicket/sandbox/ivaynberg/wicket-ajax-multipart/
svn commit: r802642 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/HttpsRequestCycleProcessor.java
Author: ivaynberg Date: Mon Aug 10 03:20:02 2009 New Revision: 802642 URL: http://svn.apache.org/viewvc?rev=802642&view=rev Log: fixed javadoc typo Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/HttpsRequestCycleProcessor.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/HttpsRequestCycleProcessor.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/HttpsRequestCycleProcessor.java?rev=802642&r1=802641&r2=802642&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/HttpsRequestCycleProcessor.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/https/HttpsRequestCycleProcessor.java Mon Aug 10 03:20:02 2009 @@ -42,7 +42,7 @@ * @Override * protected IRequestCycleProcessor newRequestCycleProcessor() * { - * return new SecureRequestCycleProcessor(config); + * return new HttpsRequestCycleProcessor(config); * } * } *
svn commit: r802814 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
Author: ivaynberg Date: Mon Aug 10 14:48:42 2009 New Revision: 802814 URL: http://svn.apache.org/viewvc?rev=802814&view=rev Log: WICKET-2397 Issue: WICKET-2397 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java?rev=802814&r1=802813&r2=802814&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java Mon Aug 10 14:48:42 2009 @@ -636,7 +636,7 @@ // when null, check whether this is natural for that component, or // whether - as is the case with text fields - this can only happen // when the component was disabled - if (input == null && !isInputNullable()) + if (input == null && !isInputNullable() && !isEnabledInHierarchy()) { // this value must have come from a disabled field // do not perform validation
svn commit: r803173 - in /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table: DataTable.html DataTable.java
Author: ivaynberg Date: Tue Aug 11 15:53:11 2009 New Revision: 803173 URL: http://svn.apache.org/viewvc?rev=803173&view=rev Log: WICKET-2422 DefaultDataTable hides NavigationToolbar once and forever Issue: WICKET-2422 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html?rev=803173&r1=803172&r2=803173&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Tue Aug 11 15:53:11 2009 @@ -15,20 +15,13 @@ limitations under the License. --> - - - - - - - - - - - - - - + + + + + + + Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java?rev=803173&r1=803172&r2=803173&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.java Tue Aug 11 15:53:11 2009 @@ -304,8 +304,6 @@ "Toolbar must have component id equal to AbstractDataTable.TOOLBAR_COMPONENT_ID"); } - toolbar.setRenderBodyOnly(true); - // create a container item for the toolbar (required by repeating view) WebMarkupContainer item = new ToolbarContainer(container.newChildId()); item.setRenderBodyOnly(true); @@ -377,8 +375,7 @@ } /** -* Acts as a container item for a single toolbar. The main feature it implements is the -* visibility check, this item is visible only if the toolbar placed into it is visible. +* Acts as a container item for a single toolbar. * * TODO 1.5 optimization: this can probably be removed and items can be added directly to the * toolbarcontainer @@ -399,20 +396,10 @@ { super(id); } - - /** {...@inheritdoc} */ - @Override - public boolean isVisible() - { - return ((Component)iterator().next()).isVisible(); - } } /** -* This class acts as a repeater that will contain the toolbar. The key feature it implements is -* the visibility check, this container is only visible if at least one child is visible. This -* helps to properly hide thead/tfoot sections if no toolbars will be visible -* because those sections cannot be empty according to html spec. +* This class acts as a repeater that will contain the toolbar. * * @author igor.vaynberg */ @@ -430,31 +417,7 @@ super(id); } - /** {...@inheritdoc} */ - @Override - public boolean isVisible() - { - // only visible if at least one child is visible - final boolean[] visible = new boolean[] { false }; - visitChildren(new IVisitor() - { - public Object component(Component component) - { - if (component.isVisible()) - { - visible[0] = true; - return STOP_TRAVERSAL; - } - else - { - return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; - } - } - - }); - return visible[0]; - } } }
svn commit: r803175 - in /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter: FilterForm.java FilterToolbar.html
Author: ivaynberg Date: Tue Aug 11 16:00:48 2009 New Revision: 803175 URL: http://svn.apache.org/viewvc?rev=803175&view=rev Log: WICKET-2417 FilterToolbar, FilterForm conformity to XHTML strict Issue: WICKET-2417 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.html Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java?rev=803175&r1=803174&r2=803175&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java Tue Aug 11 16:00:48 2009 @@ -78,7 +78,7 @@ protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { AppendingStringBuffer script = new AppendingStringBuffer( - "_filter_focus_restore('").append( + "<script type=\"text/javascript\">_filter_focus_restore('").append( getFocusTrackerFieldCssId()).append("');"); replaceComponentTagBody(markupStream, openTag, script); } Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.html URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.html?rev=803175&r1=803174&r2=803175&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.html (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterToolbar.html Tue Aug 11 16:00:48 2009 @@ -16,7 +16,7 @@ --> -
svn commit: r803182 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_et.properties
Author: ivaynberg Date: Tue Aug 11 16:17:44 2009 New Revision: 803182 URL: http://svn.apache.org/viewvc?rev=803182&view=rev Log: WICKET-2415 Estonian translation for StringValidator.minimum contains ${mimimum} instead of ${minimum} Issue: WICKET-2415 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_et.properties Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_et.properties URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_et.properties?rev=803182&r1=803181&r2=803182&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_et.properties (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_et.properties Tue Aug 11 16:17:44 2009 @@ -20,7 +20,7 @@ MaximumValidator='${input}' peab olema v\u00E4iksem kui ${maximum}. StringValidator.range='${input}' peab olema ${minimum} - ${maximum} m\u00E4rki pikk. -StringValidator.minimum='${input}' peab olema v\u00E4hemalt ${mimimum} m\u00E4rki pikk. +StringValidator.minimum='${input}' peab olema v\u00E4hemalt ${minimum} m\u00E4rki pikk. StringValidator.maximum='${input}' ei tohi olla \u00FCle ${maximum} m\u00E4rgi pikk. DateValidator.range='${input}' peab olema ${minimum} ja ${maximum} vahel.
svn commit: r803191 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java
Author: ivaynberg Date: Tue Aug 11 16:28:05 2009 New Revision: 803191 URL: http://svn.apache.org/viewvc?rev=803191&view=rev Log: WICKET-2374 Model's factory methods are inconsistent Issue: WICKET-2374 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java?rev=803191&r1=803190&r2=803191&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/model/Model.java Tue Aug 11 16:28:05 2009 @@ -16,21 +16,14 @@ */ package org.apache.wicket.model; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; - import org.apache.wicket.Component; import org.apache.wicket.WicketRuntimeException; -import org.apache.wicket.model.util.MapModel; -import org.apache.wicket.model.util.WildcardCollectionModel; -import org.apache.wicket.model.util.WildcardListModel; -import org.apache.wicket.model.util.WildcardSetModel; +import org.apache.wicket.model.util.*; import org.apache.wicket.util.lang.Objects; +import java.io.Serializable; +import java.util.*; + /** * Model is the basic implementation of an IModel. It just wraps a simple @@ -107,14 +100,31 @@ *model type * @param list *The List, which may or may not be Serializable +* @deprecated see {...@link Model#ofList(List)} * @return A Model object wrapping the List */ + @Deprecated public static IModel> of(final List list) { return new WildcardListModel(list); } /** +* Factory method for models that contain lists. This factory method will automatically rebuild +* a nonserializable list into a serializable one. +* +* @param +*model type +* @param list +*The List, which may or may not be Serializable +* @return A Model object wrapping the List +*/ + public static IModel> ofList(final List list) + { + return new WildcardListModel(list); + } + + /** * Factory method for models that contain maps. This factory method will automatically rebuild a * nonserializable map into a serializable one. * @@ -160,14 +170,31 @@ *model type * @param set *The Set, which may or may not be Serializable +* @deprecated replace by {...@link Model#ofSet(java.util.Set)}. * @return A Model object wrapping the Set */ + @Deprecated public static IModel> of(final Set set) { return new WildcardSetModel(set); } /** +* Factory method for models that contain sets. This factory method will automatically rebuild a +* nonserializable set into a serializable one. +* +* @param +*model type +* @param set +*The Set, which may or may not be Serializable +* @return A Model object wrapping the Set +*/ + public static IModel> ofSet(final Set set) + { + return new WildcardSetModel(set); + } + + /** * Factory method for models that contain collections. This factory method will automatically * rebuild a nonserializable collection into a serializable {...@link ArrayList}. *
svn commit: r803198 - /wicket/trunk/pom.xml
Author: ivaynberg Date: Tue Aug 11 16:34:22 2009 New Revision: 803198 URL: http://svn.apache.org/viewvc?rev=803198&view=rev Log: WICKET-2290 Modified: wicket/trunk/pom.xml Modified: wicket/trunk/pom.xml URL: http://svn.apache.org/viewvc/wicket/trunk/pom.xml?rev=803198&r1=803197&r2=803198&view=diff == --- wicket/trunk/pom.xml (original) +++ wicket/trunk/pom.xml Tue Aug 11 16:34:22 2009 @@ -413,7 +413,7 @@ joda-time joda-time - 1.4 + 1.6 cglib
svn commit: r803919 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/IDetachListener.java
Author: ivaynberg Date: Thu Aug 13 15:06:14 2009 New Revision: 803919 URL: http://svn.apache.org/viewvc?rev=803919&view=rev Log: fixed javadoc typo Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/IDetachListener.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/IDetachListener.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/IDetachListener.java?rev=803919&r1=803918&r2=803919&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/IDetachListener.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/IDetachListener.java Thu Aug 13 15:06:14 2009 @@ -29,7 +29,7 @@ /** * Called when component is being detached via a call to {...@link Component#detach()}. * -* NOTICE: The componet is in a fully detached state when this method is invoked; It is the +* NOTICE: The component is in a fully detached state when this method is invoked; It is the * listener's responsibility to maintain the detached state after this method is finished - * which means if the listener causes any part of the component (eg model) to become reattached * it is the listener's responsibility to detach it before this method exits.
svn commit: r803936 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/wicket-event.js
Author: ivaynberg Date: Thu Aug 13 15:54:43 2009 New Revision: 803936 URL: http://svn.apache.org/viewvc?rev=803936&view=rev Log: WICKET-2423 Not all "domready" events are called when two wicket-event.js files are added to the page Issue: WICKET-2423 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/wicket-event.js Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/wicket-event.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/wicket-event.js?rev=803936&r1=803935&r2=803936&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/wicket-event.js (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/wicket-event.js Thu Aug 13 15:54:43 2009 @@ -41,46 +41,46 @@ /** * Browser types */ - -Wicket.Browser = { - isKHTML: function() { - return /Konqueror|KHTML/.test(navigator.userAgent) && !/Apple/.test(navigator.userAgent); - }, - - isSafari: function() { - return /KHTML/.test(navigator.userAgent) && /Apple/.test(navigator.userAgent); - }, - - isOpera: function() { - return !Wicket.Browser.isSafari() && typeof(window.opera) != "undefined"; - }, - - isIE: function() { - return !Wicket.Browser.isSafari() && typeof(document.all) != "undefined" && typeof(window.opera) == "undefined"; - }, - - isIEQuirks: function() { - // is the browser internet explorer in quirks mode (we could use document.compatMode too) - return Wicket.Browser.isIE() && document.documentElement.clientHeight == 0; - }, - - isIELessThan7: function() { - var index = navigator.userAgent.indexOf("MSIE"); - var version = parseFloat(navigator.userAgent.substring(index + 5)); - return Wicket.Browser.isIE() && version < 7; - }, - - isIE7: function() { - var index = navigator.userAgent.indexOf("MSIE"); - var version = parseFloat(navigator.userAgent.substring(index + 5)); - return Wicket.Browser.isIE() && version >= 7; - }, - - isGecko: function() { - return /Gecko/.test(navigator.userAgent) && !Wicket.Browser.isSafari(); - } -}; - +if (typeof(Wicket.Browser) == "undefined") { + Wicket.Browser = { + isKHTML: function() { + return /Konqueror|KHTML/.test(navigator.userAgent) && !/Apple/.test(navigator.userAgent); + }, + + isSafari: function() { + return /KHTML/.test(navigator.userAgent) && /Apple/.test(navigator.userAgent); + }, + + isOpera: function() { + return !Wicket.Browser.isSafari() && typeof(window.opera) != "undefined"; + }, + + isIE: function() { + return !Wicket.Browser.isSafari() && typeof(document.all) != "undefined" && typeof(window.opera) == "undefined"; + }, + + isIEQuirks: function() { + // is the browser internet explorer in quirks mode (we could use document.compatMode too) + return Wicket.Browser.isIE() && document.documentElement.clientHeight == 0; + }, + + isIELessThan7: function() { + var index = navigator.userAgent.indexOf("MSIE"); + var version = parseFloat(navigator.userAgent.substring(index + 5)); + return Wicket.Browser.isIE() && version < 7; + }, + + isIE7: function() { + var index = navigator.userAgent.indexOf("MSIE"); + var version = parseFloat(navigator.userAgent.substring(index + 5)); + return Wicket.Browser.isIE() && version >= 7; + }, + + isGecko: function() { + return /Gecko/.test(navigator.userAgent) && !Wicket.Browser.isSafari(); + } + }; +} @@ -90,114 +90,116 @@ * Based on code from Mootools (http://mootools.net) */ -Wicket.Event = { - idCounter: 0, - - getId: function(element) { - var current = element.getAttribute("id"); - if (t
svn commit: r804485 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java
Author: ivaynberg Date: Sat Aug 15 16:49:37 2009 New Revision: 804485 URL: http://svn.apache.org/viewvc?rev=804485&view=rev Log: WICKET-2316 escape & in js used by form Issue: WICKET-2316 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java?rev=804485&r1=804484&r2=804485&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java Sat Aug 15 16:49:37 2009 @@ -1465,7 +1465,7 @@ buffer.append(defaultSubmittingComponent.getInputName()); buffer.append("\" onclick=\" var b=document.getElementById('"); buffer.append(submittingComponent.getMarkupId()); - buffer.append("'); if (b!=null&&b.onclick!=null&&typeof(b.onclick) != 'undefined') { var r = b.onclick.bind(b)(); if (r != false) b.click(); } else { b.click(); }; return false;\" "); + buffer.append("'); if (b!=null&&b.onclick!=null&&typeof(b.onclick) != 'undefined') { var r = b.onclick.bind(b)(); if (r != false) b.click(); } else { b.click(); }; return false;\" "); buffer.append(" />"); // close div
svn commit: r804486 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
Author: ivaynberg Date: Sat Aug 15 16:58:54 2009 New Revision: 804486 URL: http://svn.apache.org/viewvc?rev=804486&view=rev Log: WICKET-2410 AjaxRequestTarget could skip component when its ancestor is added too Issue: WICKET-2410 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=804486&r1=804485&r2=804486&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Sat Aug 15 16:58:54 2009 @@ -664,8 +664,31 @@ final Component component = entry.getValue(); final String markupId = entry.getKey(); - respondComponent(response, markupId, component); + if (!containsAncestorFor(component)) + { + respondComponent(response, markupId, component); + } + } + } + + /** +* Checks if the target contains an ancestor for the given component +* +* @param component +* @return true if target contains an ancestor for the given component +*/ + private boolean containsAncestorFor(Component component) + { + Component cursor = component.getParent(); + while (cursor != null) + { + if (markupIdToComponent.containsValue(cursor)) + { + return true; + } + cursor = cursor.getParent(); } + return false; } /**
svn commit: r804498 - /wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/examples/panels/signin/CookieTest.java
Author: ivaynberg Date: Sat Aug 15 17:56:35 2009 New Revision: 804498 URL: http://svn.apache.org/viewvc?rev=804498&view=rev Log: fix unit test Modified: wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/examples/panels/signin/CookieTest.java Modified: wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/examples/panels/signin/CookieTest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/examples/panels/signin/CookieTest.java?rev=804498&r1=804497&r2=804498&view=diff == --- wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/examples/panels/signin/CookieTest.java (original) +++ wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/examples/panels/signin/CookieTest.java Sat Aug 15 17:56:35 2009 @@ -16,13 +16,15 @@ */ package org.apache.wicket.examples.panels.signin; -import javax.servlet.ServletException; -import javax.servlet.http.Cookie; import java.io.IOException; import java.util.Collection; +import javax.servlet.ServletException; +import javax.servlet.http.Cookie; + import junit.framework.Assert; import junit.framework.TestCase; + import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.FormComponent; @@ -80,22 +82,26 @@ panel.setPersistent(true); form = (Form)panel.get("signInForm"); - final ICrypt crypt = tester.getApplication().getSecuritySettings().getCryptFactory() - .newCrypt(); + final ICrypt crypt = tester.getApplication() + .getSecuritySettings() + .getCryptFactory() + .newCrypt(); final String encryptedPassword = crypt.encryptUrlSafe("test"); assertNotNull(encryptedPassword); cookieUsername = new Cookie("panel.signInForm.username", "juergen"); Cookie cookiePassword = new Cookie("panel.signInForm.password", encryptedPassword); - Cookie[] cookies = new Cookie[]{cookieUsername, cookiePassword}; + Cookie[] cookies = new Cookie[] { cookieUsername, cookiePassword }; tester.getServletRequest().setCookies(cookies); - new WebRequestCycle(tester.getApplication(), tester.getWicketRequest(), tester.getWicketResponse()); + new WebRequestCycle(tester.getApplication(), tester.getWicketRequest(), + tester.getWicketResponse()); page = new MockPage(null); page.add(panel); - new WebRequestCycle(tester.getApplication(), tester.getWicketRequest(), tester.getWicketResponse()); + new WebRequestCycle(tester.getApplication(), tester.getWicketRequest(), + tester.getWicketResponse()); } public void testSetCookieOnForm() throws IOException, ServletException @@ -135,22 +141,28 @@ public void testPersistCookie() throws IOException, ServletException { panel.setPersistent(true); + tester.getServletRequest().setParameter("username", "johndoe"); + tester.getServletRequest().setParameter("password", "secret"); + tester.getServletRequest().setParameter("rememberMeRow:rememberMe", "on"); - // test will call persistFromComponentData(), which is private form.onFormSubmitted(); + // validate Collection cookies = tester.getServletResponse().getCookies(); Assert.assertEquals(2, cookies.size()); for (Cookie cooky : cookies) { String pathOfStoredComponent = cooky.getName().replaceAll("\\.", ":"); + if (!pathOfStoredComponent.equals("panel:signInForm:username")) + { + continue; + } Assert.assertNotNull(page.get(pathOfStoredComponent)); // Skip "deleted" cookies if (!page.get(pathOfStoredComponent).getDefaultModelObjectAsString().equals("")) { - Assert.assertEquals(cooky.getValue(), page.get(pathOfStoredComponent) - .getDefaultModelObjectAsString()); + Assert.assertEquals(cooky.getValue(), "johndoe"); } } }
svn commit: r804500 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java
Author: ivaynberg Date: Sat Aug 15 18:01:01 2009 New Revision: 804500 URL: http://svn.apache.org/viewvc?rev=804500&view=rev Log: cleaned up warnings Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java?rev=804500&r1=804499&r2=804500&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java Sat Aug 15 18:01:01 2009 @@ -107,7 +107,7 @@ */ public Object formComponent(IFormVisitorParticipant component) { - if (component instanceof FormComponent) + if (component instanceof FormComponent) { onFormComponent((FormComponent)component); } @@ -435,7 +435,7 @@ } } - if (component instanceof FormComponent) + if (component instanceof FormComponent) { final FormComponent fc = (FormComponent)component; return visitor.formComponent(fc); @@ -799,7 +799,8 @@ { inputName.prepend(id); c = c.getParent(); - if (c == null || (c instanceof Form && ((Form)c).isRootForm()) || c instanceof Page) + if (c == null || (c instanceof Form && ((Form)c).isRootForm()) || + c instanceof Page) { break; } @@ -1269,7 +1270,7 @@ { return 0; } - if (validators instanceof IValidator[]) + if (validators instanceof IValidator[]) { return ((IValidator[])validators).length; } @@ -1606,7 +1607,7 @@ { validator = validators_get(i); - if (isNull == false || validator instanceof INullAcceptingValidator) + if (isNull == false || validator instanceof INullAcceptingValidator) { validator.validate(validatable); }
svn commit: r804503 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java
Author: ivaynberg Date: Sat Aug 15 18:06:13 2009 New Revision: 804503 URL: http://svn.apache.org/viewvc?rev=804503&view=rev Log: WICKET-2378 FormTester should call detach Issue: WICKET-2378 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java?rev=804503&r1=804502&r2=804503&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/FormTester.java Sat Aug 15 18:06:13 2009 @@ -460,6 +460,7 @@ } }); + workingForm.detach(); } /**
svn commit: r804526 - /wicket/branches/wicket-1.4.1-prep/
Author: ivaynberg Date: Sat Aug 15 20:28:37 2009 New Revision: 804526 URL: http://svn.apache.org/viewvc?rev=804526&view=rev Log: 1.4.1 release prep Added: wicket/branches/wicket-1.4.1-prep/ (props changed) - copied from r804525, wicket/trunk/ Propchange: wicket/branches/wicket-1.4.1-prep/ -- --- subclipse:tags (added) +++ subclipse:tags Sat Aug 15 20:28:37 2009 @@ -0,0 +1,5 @@ +550610,wicket-1.3.0-beta2,/wicket/tags/wicket-1.3.0-beta2,tag +567792,wicket-1.3.0-beta3,/wicket/tags/wicket-1.3.0-beta3,tag +582590,wicket-1.3.0-beta4,/wicket/tags/wicket-1.3.0-beta4,tag +591745,wicket-1.3.0-rc1,/wicket/tags/wicket-1.3.0-rc1,tag +601799,wicket-1.3.0-rc2,/wicket/tags/wicket-1.3.0-rc2,tag Propchange: wicket/branches/wicket-1.4.1-prep/ -- --- svn:ignore (added) +++ svn:ignore Sat Aug 15 20:28:37 2009 @@ -0,0 +1,4 @@ +target +.metadata +.project +velocity.log Propchange: wicket/branches/wicket-1.4.1-prep/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Sat Aug 15 20:28:37 2009 @@ -0,0 +1,2 @@ +/wicket/sandbox/jthomerson/experimental/wicket-devutils:760296-760351,760353-760355 +/wicket/trunk/wicket-devutils:760352
svn commit: r804528 - in /wicket/branches/wicket-1.4.1-prep: ./ archetypes/quickstart/ archetypes/quickstart/src/main/resources/archetype-resources/ testing/wicket-threadtest/ wicket-auth-roles/ wicke
Author: ivaynberg Date: Sat Aug 15 20:36:03 2009 New Revision: 804528 URL: http://svn.apache.org/viewvc?rev=804528&view=rev Log: version tweaks and changelog Modified: wicket/branches/wicket-1.4.1-prep/CHANGELOG-1.4 wicket/branches/wicket-1.4.1-prep/archetypes/quickstart/pom.xml wicket/branches/wicket-1.4.1-prep/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml wicket/branches/wicket-1.4.1-prep/pom.xml wicket/branches/wicket-1.4.1-prep/testing/wicket-threadtest/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-auth-roles/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-datetime/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-devutils/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-examples/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-extensions/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-guice/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-ioc/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-jmx/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-objectssizeof-agent/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-quickstart/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-spring/pom.xml wicket/branches/wicket-1.4.1-prep/wicket-velocity/pom.xml wicket/branches/wicket-1.4.1-prep/wicket/pom.xml Modified: wicket/branches/wicket-1.4.1-prep/CHANGELOG-1.4 URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.1-prep/CHANGELOG-1.4?rev=804528&r1=804527&r2=804528&view=diff == --- wicket/branches/wicket-1.4.1-prep/CHANGELOG-1.4 (original) +++ wicket/branches/wicket-1.4.1-prep/CHANGELOG-1.4 Sat Aug 15 20:36:03 2009 @@ -1,6 +1,112 @@ This file contains all changes done on the 1.4 version. +Release Notes - Wicket - Version 1.4.1 + + +** Bug +* [WICKET-2316] - Form generates invalid html in appendDefaultButtonField +* [WICKET-2378] - FormTester should call detach +* [WICKET-2397] - text fields do not honor isrequired() +* [WICKET-2402] - SetRowsPerPage with AjaxFallbackDefaultDataTable +* [WICKET-2406] - Palette component breaks XHTML validation +* [WICKET-2407] - AbstractOptions of Palette may cause an HTML error with illegal chars +* [WICKET-2415] - Estonian translation for StringValidator.minimum contains ${mimimum} instead of ${minimum} +* [WICKET-2418] - NPE in ResourceReference +* [WICKET-2422] - DefaultDataTable hides NavigationToolbar once and forever +* [WICKET-2423] - Not all "domready" events are called when two wicket-event.js files are added to the page + +** Improvement +* [WICKET-2020] - Callback after detaching the page but before the PageMap lock is released +* [WICKET-2290] - upgrade pom reference for joda-time to 1.6 +* [WICKET-2374] - Model's factory methods are inconsistent +* [WICKET-2410] - AjaxRequestTarget could skip component when its ancestor is added too +* [WICKET-2413] - Better error handling when filterName attribute of WicketSessionFilter is misconfigured +* [WICKET-2417] - FilterToolbar, FilterForm conformity to XHTML strict + +** New Feature +* [WICKET-2412] - Add dev time check for empty src="" attribute that can cause problems +* [WICKET-2420] - Ajax support for multipart forms + + + +Release Notes - Wicket - Version 1.4.0 + + +** Bug +* [WICKET-2350] - Localization messages stops working with validators since 1.4-rc2 +* [WICKET-2363] - Two minor quick-to-fix quality bugs in WicketTester +* [WICKET-2366] - Refactor: org.apache.wicket.util.string.Strings#fromEscapedUnicode(String escapedUnicodeString) +* [WICKET-2367] - ApacheLicenceHeaderTest fails checking non-project file +* [WICKET-2368] - Page.checkRendering fails after setting BorderBodyContainer visiblity to false +* [WICKET-2381] - IModel parameters of StringResourceModel not getting detached +* [WICKET-2382] - Stateless problems +* [WICKET-2384] - OutOfMemoryError occur for memory leak on FeedbackPanel & FeedbackMessages +* [WICKET-2386] - JavaDoc: Some JavDoc examples still refer to WicketServlet +* [WICKET-2391] - Tag ''has a mismatched close tag at '' +* [WICKET-2392] - MarkupComponentBorder fails to close stream (?) +* [WICKET-2394] - KittenCaptcha example broken + +** Improvement +* [WICKET-2362] - Update hungarian localization + + +Release Notes - Wicket - Version 1.4-RC7 + + +** Bug +* [WICKET-2337] - IndexOutOfBoundsException when PropertyResolver is using an invalid list index +* [WICKET-2346] - Problem with displaying expired page. +* [WICKET-2354] - PropertyModel does not support index only property ("[0]") +* [WICKET-2358] - EmailAddressValidator property has a typo in French version + +** Improvement +* [WICKET-2351] - Make TimeFrame, Duration, Time and related classes Serializable. +
svn commit: r806195 - /wicket/branches/wicket-1.4.1-prep/
Author: ivaynberg Date: Thu Aug 20 14:40:50 2009 New Revision: 806195 URL: http://svn.apache.org/viewvc?rev=806195&view=rev Log: removing in favor of release tag Removed: wicket/branches/wicket-1.4.1-prep/
svn commit: r806204 - /wicket/branches/wicket-1.4.x/
Author: ivaynberg Date: Thu Aug 20 15:08:04 2009 New Revision: 806204 URL: http://svn.apache.org/viewvc?rev=806204&view=rev Log: creating 1.4 branch, trunk is now 1.5 Added: wicket/branches/wicket-1.4.x/ (props changed) - copied from r806203, wicket/trunk/ Propchange: wicket/branches/wicket-1.4.x/ -- --- subclipse:tags (added) +++ subclipse:tags Thu Aug 20 15:08:04 2009 @@ -0,0 +1,5 @@ +550610,wicket-1.3.0-beta2,/wicket/tags/wicket-1.3.0-beta2,tag +567792,wicket-1.3.0-beta3,/wicket/tags/wicket-1.3.0-beta3,tag +582590,wicket-1.3.0-beta4,/wicket/tags/wicket-1.3.0-beta4,tag +591745,wicket-1.3.0-rc1,/wicket/tags/wicket-1.3.0-rc1,tag +601799,wicket-1.3.0-rc2,/wicket/tags/wicket-1.3.0-rc2,tag Propchange: wicket/branches/wicket-1.4.x/ -- --- svn:ignore (added) +++ svn:ignore Thu Aug 20 15:08:04 2009 @@ -0,0 +1,4 @@ +target +.metadata +.project +velocity.log Propchange: wicket/branches/wicket-1.4.x/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Thu Aug 20 15:08:04 2009 @@ -0,0 +1,2 @@ +/wicket/sandbox/jthomerson/experimental/wicket-devutils:760296-760351,760353-760355 +/wicket/trunk/wicket-devutils:760352
svn commit: r806600 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField_sl.properties
Author: ivaynberg Date: Fri Aug 21 15:30:24 2009 New Revision: 806600 URL: http://svn.apache.org/viewvc?rev=806600&view=rev Log: WICKET-2430 fix sl properties for multiuploadfield Issue: WICKET-2430 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField_sl.properties Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField_sl.properties URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField_sl.properties?rev=806600&r1=806599&r2=806600&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField_sl.properties (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField_sl.properties Fri Aug 21 15:30:24 2009 @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. org.apache.wicket.mfu.caption.unlimited=Datoteke: -org.apache.wicket.mfu.caption.limited=Datoteke (najve\u\u010d ${max}): \ No newline at end of file +org.apache.wicket.mfu.caption.limited=Datoteke (najve\u010d ${max}): \ No newline at end of file
svn commit: r808042 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
Author: ivaynberg Date: Wed Aug 26 15:09:08 2009 New Revision: 808042 URL: http://svn.apache.org/viewvc?rev=808042&view=rev Log: WICKET-2436 invalid DataTable markup breaks table layout Issue: WICKET-2436 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html?rev=808042&r1=808041&r2=808042&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Wed Aug 26 15:09:08 2009 @@ -16,12 +16,12 @@ --> - - - - - - + + + + + +
svn commit: r808057 - in /wicket/branches/wicket-1.4.x/wicket-extensions: .settings/org.eclipse.jdt.core.prefs src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html
Author: ivaynberg Date: Wed Aug 26 15:36:01 2009 New Revision: 808057 URL: http://svn.apache.org/viewvc?rev=808057&view=rev Log: WICKET-2436 invalid DataTable markup breaks table layout Issue: WICKET-2436 Modified: wicket/branches/wicket-1.4.x/wicket-extensions/.settings/org.eclipse.jdt.core.prefs wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Modified: wicket/branches/wicket-1.4.x/wicket-extensions/.settings/org.eclipse.jdt.core.prefs URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/.settings/org.eclipse.jdt.core.prefs?rev=808057&r1=808056&r2=808057&view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/.settings/org.eclipse.jdt.core.prefs (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/.settings/org.eclipse.jdt.core.prefs Wed Aug 26 15:36:01 2009 @@ -1,4 +1,4 @@ -#Sun May 11 13:48:46 CEST 2008 +#Wed Aug 26 08:14:09 PDT 2009 eclipse.preferences.version=1 org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html?rev=808057&r1=808056&r2=808057&view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html Wed Aug 26 15:36:01 2009 @@ -15,13 +15,12 @@ limitations under the License. --> - - - - - - - + + + + + + @@ -30,3 +29,4 @@ +
svn commit: r809646 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
Author: ivaynberg Date: Mon Aug 31 16:08:31 2009 New Revision: 809646 URL: http://svn.apache.org/viewvc?rev=809646&view=rev Log: protected getter for webapplication Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=809646&r1=809645&r2=809646&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java Mon Aug 31 16:08:31 2009 @@ -178,6 +178,18 @@ } } + + /** +* Gets webApplication managed by this filter +* +* @return webApplication +*/ + protected WebApplication getWebApplication() + { + return webApplication; + } + + /** * As per {...@link javax.servlet.Filter#doFilter}, is called by the container each time a * request/response pair is passed through the chain due to a client request for a resource at
svn commit: r809647 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
Author: ivaynberg Date: Mon Aug 31 16:08:57 2009 New Revision: 809647 URL: http://svn.apache.org/viewvc?rev=809647&view=rev Log: protected getter for webapplication Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=809647&r1=809646&r2=809647&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java Mon Aug 31 16:08:57 2009 @@ -178,6 +178,18 @@ } } + + /** +* Gets webApplication managed by this filter +* +* @return webApplication +*/ + protected WebApplication getWebApplication() + { + return webApplication; + } + + /** * As per {...@link javax.servlet.Filter#doFilter}, is called by the container each time a * request/response pair is passed through the chain due to a client request for a resource at
svn commit: r810697 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java
Author: ivaynberg Date: Wed Sep 2 20:54:30 2009 New Revision: 810697 URL: http://svn.apache.org/viewvc?rev=810697&view=rev Log: WICKET-2438 AjaxEventBehavior not working on feedback message components Issue: WICKET-2438 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java?rev=810697&r1=810696&r2=810697&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Wed Sep 2 20:54:30 2009 @@ -94,13 +94,6 @@ listItem.add(levelModifier); listItem.add(label); } - - @Override - protected void onDetach() - { - removeAll(); - super.onDetach(); - } } private static final long serialVersionUID = 1L;
svn commit: r810700 - in /wicket/branches/wicket-1.4.x/wicket: .settings/org.eclipse.jdt.core.prefs src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java
Author: ivaynberg Date: Wed Sep 2 21:23:10 2009 New Revision: 810700 URL: http://svn.apache.org/viewvc?rev=810700&view=rev Log: WICKET-2438: AjaxEventBehavior not working on feedback message components Issue: WICKET-2438 Modified: wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Modified: wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs?rev=810700&r1=810699&r2=810700&view=diff == --- wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs (original) +++ wicket/branches/wicket-1.4.x/wicket/.settings/org.eclipse.jdt.core.prefs Wed Sep 2 21:23:10 2009 @@ -1,6 +1,5 @@ -#Wed Sep 10 11:28:56 PDT 2008 +#Wed Aug 26 08:15:28 PDT 2009 eclipse.preferences.version=1 -instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true org.eclipse.jdt.core.builder.cleanOutputFolder=clean org.eclipse.jdt.core.builder.duplicateResourceTask=warning org.eclipse.jdt.core.builder.invalidClasspath=abort Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java?rev=810700&r1=810699&r2=810700&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/panel/FeedbackPanel.java Wed Sep 2 21:23:10 2009 @@ -94,13 +94,6 @@ listItem.add(levelModifier); listItem.add(label); } - - @Override - protected void onDetach() - { - removeAll(); - super.onDetach(); - } } private static final long serialVersionUID = 1L;
svn commit: r811751 - /wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html
Author: ivaynberg Date: Sun Sep 6 03:34:31 2009 New Revision: 811751 URL: http://svn.apache.org/viewvc?rev=811751&view=rev Log: WICKET-2404 Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html Modified: wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html URL: http://svn.apache.org/viewvc/wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html?rev=811751&r1=811750&r2=811751&view=diff == --- wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html (original) +++ wicket/trunk/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html Sun Sep 6 03:34:31 2009 @@ -1,4 +1,4 @@ -http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"; > +http://wicket.apache.org/dtds.data/wicket-xhtml1.5-strict.dtd"; > Wicket Quickstart Archetype Homepage @@ -8,4 +8,3 @@ message will be here -
svn commit: r811752 - /wicket/branches/wicket-1.4.x/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html
Author: ivaynberg Date: Sun Sep 6 03:34:38 2009 New Revision: 811752 URL: http://svn.apache.org/viewvc?rev=811752&view=rev Log: WICKET-2404 Modified: wicket/branches/wicket-1.4.x/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html Modified: wicket/branches/wicket-1.4.x/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html?rev=811752&r1=811751&r2=811752&view=diff == --- wicket/branches/wicket-1.4.x/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html (original) +++ wicket/branches/wicket-1.4.x/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HomePage.html Sun Sep 6 03:34:38 2009 @@ -1,4 +1,4 @@ -http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"; > +http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"; > Wicket Quickstart Archetype Homepage @@ -8,4 +8,3 @@ message will be here -
svn commit: r811755 - /wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java
Author: ivaynberg Date: Sun Sep 6 04:01:49 2009 New Revision: 811755 URL: http://svn.apache.org/viewvc?rev=811755&view=rev Log: WICKET-2444: Internal Spring beans should be ignored Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java Modified: wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java?rev=811755&r1=811754&r2=811755&view=diff == --- wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java (original) +++ wicket/trunk/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java Sun Sep 6 04:01:49 2009 @@ -17,6 +17,10 @@ package org.apache.wicket.spring; import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; import org.apache.wicket.proxy.IProxyTargetLocator; import org.apache.wicket.util.lang.Classes; @@ -103,25 +107,41 @@ */ private final String getBeanNameOfClass(ApplicationContext ctx, Class< ? > clazz) { - String[] names = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(ctx, clazz); - if (names.length == 0) + // get the list of all possible matching beans + List names = new ArrayList(Arrays.asList(BeanFactoryUtils + .beanNamesForTypeIncludingAncestors(ctx, clazz))); + Iterator it = names.iterator(); + + // filter out beans that are not condidates for autowiring + while (it.hasNext()) + { + final String possibility = it.next(); + if (BeanFactoryUtils.isFactoryDereference(possibility) || + possibility.startsWith("scopedTarget.")) + { + it.remove(); + } + } + + if (names.isEmpty()) { throw new IllegalStateException("bean of type [" + clazz.getName() + "] not found"); } - if (names.length > 1) + else if (names.size() > 1) { - StringBuffer msg = new StringBuffer(); + StringBuilder msg = new StringBuilder(); msg.append("more then one bean of type ["); msg.append(clazz.getName()); msg.append("] found, you have to specify the name of the bean "); msg.append("(@SpringBean(name=\"foo\")) in order to resolve this conflict. "); - msg.append("Matched beans: "); - msg.append(Strings.join(",", names)); - + msg.append(Strings.join(",", names.toArray(new String[0]))); throw new IllegalStateException(msg.toString()); } - return names[0]; + else + { + return names.get(0); + } } /**
svn commit: r811756 - /wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java
Author: ivaynberg Date: Sun Sep 6 04:01:57 2009 New Revision: 811756 URL: http://svn.apache.org/viewvc?rev=811756&view=rev Log: WICKET-2444: Internal Spring beans should be ignored Modified: wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java Modified: wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java?rev=811756&r1=811755&r2=811756&view=diff == --- wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java (original) +++ wicket/branches/wicket-1.4.x/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java Sun Sep 6 04:01:57 2009 @@ -17,6 +17,10 @@ package org.apache.wicket.spring; import java.lang.ref.WeakReference; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; import org.apache.wicket.proxy.IProxyTargetLocator; import org.apache.wicket.util.lang.Classes; @@ -103,25 +107,41 @@ */ private final String getBeanNameOfClass(ApplicationContext ctx, Class< ? > clazz) { - String[] names = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(ctx, clazz); - if (names.length == 0) + // get the list of all possible matching beans + List names = new ArrayList(Arrays.asList(BeanFactoryUtils + .beanNamesForTypeIncludingAncestors(ctx, clazz))); + Iterator it = names.iterator(); + + // filter out beans that are not condidates for autowiring + while (it.hasNext()) + { + final String possibility = it.next(); + if (BeanFactoryUtils.isFactoryDereference(possibility) || + possibility.startsWith("scopedTarget.")) + { + it.remove(); + } + } + + if (names.isEmpty()) { throw new IllegalStateException("bean of type [" + clazz.getName() + "] not found"); } - if (names.length > 1) + else if (names.size() > 1) { - StringBuffer msg = new StringBuffer(); + StringBuilder msg = new StringBuilder(); msg.append("more then one bean of type ["); msg.append(clazz.getName()); msg.append("] found, you have to specify the name of the bean "); msg.append("(@SpringBean(name=\"foo\")) in order to resolve this conflict. "); - msg.append("Matched beans: "); - msg.append(Strings.join(",", names)); - + msg.append(Strings.join(",", names.toArray(new String[0]))); throw new IllegalStateException(msg.toString()); } - return names[0]; + else + { + return names.get(0); + } } /**
svn commit: r811757 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/markup/html/link/ main/java/org/apache/wicket/request/target/coding/ main/java/org/apache/wi
Author: ivaynberg Date: Sun Sep 6 04:44:30 2009 New Revision: 811757 URL: http://svn.apache.org/viewvc?rev=811757&view=rev Log: WICKET-2449: Fix javadoc biggest mistakes - mainly @Deprecated tags Issue: WICKET-2449 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/IPageFactory.java wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java wicket/trunk/wicket/src/main/java/org/apache/wicket/MetaDataKey.java wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java wicket/trunk/wicket/src/main/java/org/apache/wicket/PageId.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PageLink.java wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/HybridUrlCodingStrategy.java wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/component/PageIdRequestTarget.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/ConverterLocator.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/MaskConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/value/CopyOnWriteValueMap.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/value/IntValue.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/value/LongValue.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/value/ValueMap.java wicket/trunk/wicket/src/test/java/org/apache/wicket/request/target/coding/IndexedSharedResourceCodingStrategyTest.java wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/LoginPage.java wicket/trunk/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/IPageFactory.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/IPageFactory.java?rev=811757&r1=811756&r2=811757&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/IPageFactory.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/IPageFactory.java Sun Sep 6 04:44:30 2009 @@ -27,7 +27,6 @@ * * @see org.apache.wicket.settings.ISessionSettings#setPageFactory(IPageFactory) * @see Session#getPageFactory() - * @see Session#getPageFactory(Page) * * @author Juergen Donnerstag * @author Jonathan Locke Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java?rev=811757&r1=811756&r2=811757&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java Sun Sep 6 04:44:30 2009 @@ -150,8 +150,9 @@ * @return String * @throws MissingResourceException * -* @Deprecated please use {...@link #getString(String, Component, IModel, String)} +* @deprecated please use {...@link #getString(String, Component, IModel, String)} */ + @Deprecated public String getString(final String key, final Component component, final IModel model, final Locale locale, final String style, final String defaultValue) throws MissingResourceException Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/MetaDataKey.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/MetaDataKey.java?rev=811757&r1=811756&r2=811757&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/MetaDataKey.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/MetaDataKey.java Sun Sep 6 04:44:30 2009 @@ -36,9 +36,6 @@ /** * Constructor. -* -* @param type -*The type of value stored under this key */ public MetaDataKey() { Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java?rev=811757&r1=811756&r2=811757&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java Sun Sep 6 04:44:30 2009 @@ -688,7 +688,7 @@ try { - if (getClass().getConstructor(new Class[] { }) != null) + if (getClass().getConstructor(new Class[] {}) != null) {
svn commit: r811758 - in /wicket/branches/wicket-1.4.x/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/markup/html/link/ main/java/org/apache/wicket/request/target/coding/ main/ja
Author: ivaynberg Date: Sun Sep 6 04:45:15 2009 New Revision: 811758 URL: http://svn.apache.org/viewvc?rev=811758&view=rev Log: WICKET-2449: fix javadoc problems Issue: WICKET-2449 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/IPageFactory.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MetaDataKey.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Page.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/PageId.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/link/PageLink.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/HybridUrlCodingStrategy.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/component/PageIdRequestTarget.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/convert/ConverterLocator.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/convert/MaskConverter.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/value/CopyOnWriteValueMap.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/value/IntValue.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/value/LongValue.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/value/ValueMap.java wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/request/target/coding/IndexedSharedResourceCodingStrategyTest.java wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/stateless/pages/LoginPage.java wicket/branches/wicket-1.4.x/wicket/src/test/java/org/apache/wicket/stateless/pages/UsernamePasswordSignInPanel.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/IPageFactory.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/IPageFactory.java?rev=811758&r1=811757&r2=811758&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/IPageFactory.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/IPageFactory.java Sun Sep 6 04:45:15 2009 @@ -27,7 +27,6 @@ * * @see org.apache.wicket.settings.ISessionSettings#setPageFactory(IPageFactory) * @see Session#getPageFactory() - * @see Session#getPageFactory(Page) * * @author Juergen Donnerstag * @author Jonathan Locke Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java?rev=811758&r1=811757&r2=811758&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Localizer.java Sun Sep 6 04:45:15 2009 @@ -150,8 +150,9 @@ * @return String * @throws MissingResourceException * -* @Deprecated please use {...@link #getString(String, Component, IModel, String)} +* @deprecated please use {...@link #getString(String, Component, IModel, String)} */ + @Deprecated public String getString(final String key, final Component component, final IModel model, final Locale locale, final String style, final String defaultValue) throws MissingResourceException Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MetaDataKey.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MetaDataKey.java?rev=811758&r1=811757&r2=811758&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MetaDataKey.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MetaDataKey.java Sun Sep 6 04:45:15 2009 @@ -36,9 +36,6 @@ /** * Constructor. -* -* @param type -*The type of value stored under this key */ public MetaDataKey() { Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Page.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Page.java?rev=811758&r1=811757&r2=811758&view=diff == --
svn commit: r811760 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java
Author: ivaynberg Date: Sun Sep 6 04:58:08 2009 New Revision: 811760 URL: http://svn.apache.org/viewvc?rev=811760&view=rev Log: WICKET-2451 Add ability to load UTF-8 encoded properties not in XML format. Issue: WICKET-2451 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java?rev=811760&r1=811759&r2=811760&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java Sun Sep 6 04:58:08 2009 @@ -17,7 +17,11 @@ package org.apache.wicket.resource; import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; @@ -313,11 +317,26 @@ */ public class PropertiesFilePropertiesLoader extends AbstractPropertiesLoader { + /** Can the JDK read properties from Reader ? */ + private boolean loadFromReaderAvailable = false; + + /** +* Buffer size used when reading a properties file. +*/ + private static final int BUFFER_SIZE = 2000; + /** * Construct. */ public PropertiesFilePropertiesLoader() { + try { + Properties.class.getMethod("load", new Class[] {Reader.class}); + loadFromReaderAvailable = true; + } + catch (NoSuchMethodException ex) { + loadFromReaderAvailable = false; + } } /** @@ -340,9 +359,53 @@ protected java.util.Properties loadProperties(BufferedInputStream in) throws IOException { java.util.Properties properties = new java.util.Properties(); + // If we are on JDK 6 we load from Reader + if (loadFromReaderAvailable) { properties.load(in); + // If we are on JDK <=5 then we convert to ASCII + } else { + properties.load(readUTFStreamToEscapedASCII(in)); + } return properties; } + + /** +* Reads a UTF-8 stream, performing a conversion to ASCII (i.e., ISO8859-1 encoding). Characters outside the normal +* range for ISO8859-1 are converted to unicode escapes. In effect, Tapestry is performing native2ascii on the +* files, on the fly. +*/ + private InputStream readUTFStreamToEscapedASCII(InputStream is) throws IOException + { + Reader reader = new InputStreamReader(is, "UTF-8"); + + StringBuilder builder = new StringBuilder(BUFFER_SIZE); + char[] buffer = new char[BUFFER_SIZE]; + + while (true) + { + int length = reader.read(buffer); + + if (length < 0) break; + + for (int i = 0; i < length; i++) + { + char ch = buffer[i]; + + if (ch <= '\u007f') + { + builder.append(ch); + continue; + } + builder.append(String.format("\\u%04x", (int) ch)); + } + } + + reader.close(); + + byte[] resourceContent = builder.toString().getBytes(); + return new ByteArrayInputStream(resourceContent); + } + } /**
svn commit: r811761 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java
Author: ivaynberg Date: Sun Sep 6 04:58:15 2009 New Revision: 811761 URL: http://svn.apache.org/viewvc?rev=811761&view=rev Log: WICKET-2451 Add ability to load UTF-8 encoded properties not in XML format. Issue: WICKET-2451 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java?rev=811761&r1=811760&r2=811761&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java Sun Sep 6 04:58:15 2009 @@ -17,7 +17,11 @@ package org.apache.wicket.resource; import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; @@ -313,11 +317,26 @@ */ public class PropertiesFilePropertiesLoader extends AbstractPropertiesLoader { + /** Can the JDK read properties from Reader ? */ + private boolean loadFromReaderAvailable = false; + + /** +* Buffer size used when reading a properties file. +*/ + private static final int BUFFER_SIZE = 2000; + /** * Construct. */ public PropertiesFilePropertiesLoader() { + try { + Properties.class.getMethod("load", new Class[] {Reader.class}); + loadFromReaderAvailable = true; + } + catch (NoSuchMethodException ex) { + loadFromReaderAvailable = false; + } } /** @@ -340,9 +359,53 @@ protected java.util.Properties loadProperties(BufferedInputStream in) throws IOException { java.util.Properties properties = new java.util.Properties(); + // If we are on JDK 6 we load from Reader + if (loadFromReaderAvailable) { properties.load(in); + // If we are on JDK <=5 then we convert to ASCII + } else { + properties.load(readUTFStreamToEscapedASCII(in)); + } return properties; } + + /** +* Reads a UTF-8 stream, performing a conversion to ASCII (i.e., ISO8859-1 encoding). Characters outside the normal +* range for ISO8859-1 are converted to unicode escapes. In effect, Tapestry is performing native2ascii on the +* files, on the fly. +*/ + private InputStream readUTFStreamToEscapedASCII(InputStream is) throws IOException + { + Reader reader = new InputStreamReader(is, "UTF-8"); + + StringBuilder builder = new StringBuilder(BUFFER_SIZE); + char[] buffer = new char[BUFFER_SIZE]; + + while (true) + { + int length = reader.read(buffer); + + if (length < 0) break; + + for (int i = 0; i < length; i++) + { + char ch = buffer[i]; + + if (ch <= '\u007f') + { + builder.append(ch); + continue; + } + builder.append(String.format("\\u%04x", (int) ch)); + } + } + + reader.close(); + + byte[] resourceContent = builder.toString().getBytes(); + return new ByteArrayInputStream(resourceContent); + } + } /**
svn commit: r811762 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding: MixedParamHybridUrlCodingStrategy.java MixedParamUrlCodingStrategy.java
Author: ivaynberg Date: Sun Sep 6 05:39:34 2009 New Revision: 811762 URL: http://svn.apache.org/viewvc?rev=811762&view=rev Log: WICKET-2439 Improve MixedParamUrlCodingStrategy, introduce Hybrid Issue: WICKET-2439 Added: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java (with props) Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamUrlCodingStrategy.java Added: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java?rev=811762&view=auto == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java (added) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java Sun Sep 6 05:39:34 2009 @@ -0,0 +1,226 @@ +/* + * 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. + */ +package org.apache.wicket.request.target.coding; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.wicket.PageParameters; +import org.apache.wicket.RequestCycle; +import org.apache.wicket.Page; +import org.apache.wicket.protocol.http.WebRequest; +import org.apache.wicket.util.string.AppendingStringBuffer; +import org.apache.wicket.util.string.Strings; +import org.apache.wicket.util.value.ValueMap; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + +import javax.servlet.http.HttpServletRequest; + +/** + * Url coding strategy for bookmarkable pages with Ajax components that encodes a set of given + * parameters in the url's path and the rest in the query-string. In addition, the page version + * is added to the end of the url's path. + * + * Strategy looks for path-parameters whose name is read from an array of names e.g. ["param0", + * "param1"]. Found parameters will be appended to the url in the form + * /mount-path/paramvalue0/paramvalue1. + * + * All other parameters are added as parameter in the form: + * /mount-path/paramvalue0?otherparam0=otherparamvalue0&otherparam1=otherparamvalue1. + * + * Decode is symmetric except for when a path parameter that is not at the end has no value during + * encode. For example, the names for the path parameters are: "a", "b" and "c". When "b" is not + * specified upon encoding, but "c" is, upon a decode "b" will get the empty string as value. When + * both "b" and "c" are missing on encode, the will not get a value during decode. + * + * @author erik.van.oosten + * @see MixedParamUrlCodingStrategy + */ +public class MixedParamHybridUrlCodingStrategy extends HybridUrlCodingStrategy +{ +private static Logger logger = LoggerFactory.getLogger(MixedParamHybridUrlCodingStrategy.class); + +private final String[] parameterNames; +private boolean ignoreUndeclaredParameters = true; + +/** + * Construct. + * + * @param mountPath mount path + * @param pageClass class of mounted page + * @param redirectOnBookmarkableRequest + *whether after hitting the page with URL in bookmarkable form it should be + *redirected to hybrid URL - needed for ajax to work properly after page refresh + * @param parameterNames the parameter names (not null) + */ +public MixedParamHybridUrlCodingStrategy( +String mountPath, Class pageClass, +boolean redirectOnBookmarkableRequest, String[] parameterNames) +{ +super(mountPath, pageClass, redirectOnBookmarkableRequest); +this.parameterNames = parameterNames; +} + +/** + * Construct. + * + * @param mountPath mount path + * @param pageClass class of mounted page + * @param parameterNames the parameter names (not null) + */ +public MixedParamHybridUrlCoding
svn commit: r811763 - in /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding: MixedParamHybridUrlCodingStrategy.java MixedParamUrlCodingStrategy.java
Author: ivaynberg Date: Sun Sep 6 05:39:42 2009 New Revision: 811763 URL: http://svn.apache.org/viewvc?rev=811763&view=rev Log: WICKET-2439 Improve MixedParamUrlCodingStrategy, introduce Hybrid Issue: WICKET-2439 Added: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java (with props) Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamUrlCodingStrategy.java Added: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java?rev=811763&view=auto == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java (added) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/MixedParamHybridUrlCodingStrategy.java Sun Sep 6 05:39:42 2009 @@ -0,0 +1,226 @@ +/* + * 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. + */ +package org.apache.wicket.request.target.coding; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.wicket.PageParameters; +import org.apache.wicket.RequestCycle; +import org.apache.wicket.Page; +import org.apache.wicket.protocol.http.WebRequest; +import org.apache.wicket.util.string.AppendingStringBuffer; +import org.apache.wicket.util.string.Strings; +import org.apache.wicket.util.value.ValueMap; +import org.slf4j.LoggerFactory; +import org.slf4j.Logger; + +import javax.servlet.http.HttpServletRequest; + +/** + * Url coding strategy for bookmarkable pages with Ajax components that encodes a set of given + * parameters in the url's path and the rest in the query-string. In addition, the page version + * is added to the end of the url's path. + * + * Strategy looks for path-parameters whose name is read from an array of names e.g. ["param0", + * "param1"]. Found parameters will be appended to the url in the form + * /mount-path/paramvalue0/paramvalue1. + * + * All other parameters are added as parameter in the form: + * /mount-path/paramvalue0?otherparam0=otherparamvalue0&otherparam1=otherparamvalue1. + * + * Decode is symmetric except for when a path parameter that is not at the end has no value during + * encode. For example, the names for the path parameters are: "a", "b" and "c". When "b" is not + * specified upon encoding, but "c" is, upon a decode "b" will get the empty string as value. When + * both "b" and "c" are missing on encode, the will not get a value during decode. + * + * @author erik.van.oosten + * @see MixedParamUrlCodingStrategy + */ +public class MixedParamHybridUrlCodingStrategy extends HybridUrlCodingStrategy +{ +private static Logger logger = LoggerFactory.getLogger(MixedParamHybridUrlCodingStrategy.class); + +private final String[] parameterNames; +private boolean ignoreUndeclaredParameters = true; + +/** + * Construct. + * + * @param mountPath mount path + * @param pageClass class of mounted page + * @param redirectOnBookmarkableRequest + *whether after hitting the page with URL in bookmarkable form it should be + *redirected to hybrid URL - needed for ajax to work properly after page refresh + * @param parameterNames the parameter names (not null) + */ +public MixedParamHybridUrlCodingStrategy( +String mountPath, Class pageClass, +boolean redirectOnBookmarkableRequest, String[] parameterNames) +{ +super(mountPath, pageClass, redirectOnBookmarkableRequest); +this.parameterNames = parameterNames; +} + +/** + * Construct. + * + * @param mountPath mount path + * @param pageClass class of mounted page + * @param
svn commit: r811766 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java
Author: ivaynberg Date: Sun Sep 6 06:00:36 2009 New Revision: 811766 URL: http://svn.apache.org/viewvc?rev=811766&view=rev Log: WICKET-2447 Issue: WICKET-2447 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java?rev=811766&r1=811765&r2=811766&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java Sun Sep 6 06:00:36 2009 @@ -26,7 +26,6 @@ import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.markup.MarkupStream; -import org.apache.wicket.markup.html.WebComponent; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.TextField; @@ -78,7 +77,7 @@ private FormComponent editor; /** label component. */ - private WebComponent label; + private Component label; protected class EditorAjaxBehavior extends AbstractDefaultAjaxBehavior { @@ -321,7 +320,7 @@ *The model * @return The editor */ - protected WebComponent newLabel(MarkupContainer parent, String componentId, IModel model) + protected Component newLabel(MarkupContainer parent, String componentId, IModel model) { Label label = new Label(componentId, model) { @@ -384,7 +383,7 @@ * * @return The label component */ - protected final WebComponent getLabel() + protected final Component getLabel() { if (label == null) {
svn commit: r815602 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Wed Sep 16 04:29:41 2009 New Revision: 815602 URL: http://svn.apache.org/viewvc?rev=815602&view=rev Log: WICKET-2463 Ajax miltipart form submitting ignores setDefaultFormProcessing(false) Issue: WICKET-2463 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=815602&r1=815601&r2=815602&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 16 04:29:41 2009 @@ -1056,7 +1056,7 @@ // Submits a form using ajax. // This method serializes a form and sends it as POST body. submitForm: function(form, submitButton) { - if (this.handleMultipart(form)) { + if (this.handleMultipart(form, submitButton)) { return true; } var body = function() { @@ -1072,7 +1072,7 @@ // If the form contains multipart content this function will post // the form using an iframe instead of the regular ajax call // and bridge the output - transparently making this work as if it was an ajax call - handleMultipart: function (form) { + handleMultipart: function (form, submitButton) { if (form.enctype!="multipart/form-data") { // not handled, return false @@ -1105,6 +1105,20 @@ // reconfigure the form form.target=iframe.name; form.action=this.request.url; + + // create submitting button element + if (submitButton!=null) { + try { + var btn = document.createElement(""); + } catch (ex) { + var btn = document.createElement("input"); + btn.type="hidden"; + btn.name=submitButton; + btn.id=iframe.id+"-btn"; + btn.value="1"; + } + } + form.appendChild(btn); //submit the form into the iframe, response will be handled by the onload callback form.submit(); @@ -1136,8 +1150,8 @@ else iframe.removeEventListener("load", this.handleMultipartComplete, false); - // remove the iframe - setTimeout(function() { iframe.parentNode.removeChild(iframe); }, 250); + // remove the iframe and button elements + setTimeout(function() { var e=document.getElementById(iframe.id+"-btn"); if (e!=null) { e.parentNode.removeChild(e); } iframe.parentNode.removeChild(iframe); }, 250); }, // Processes the response
svn commit: r815604 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Wed Sep 16 04:35:58 2009 New Revision: 815604 URL: http://svn.apache.org/viewvc?rev=815604&view=rev Log: WICKET-2463 Ajax miltipart form submitting ignores setDefaultFormProcessing(false) Issue: WICKET-2463 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=815604&r1=815603&r2=815604&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 16 04:35:58 2009 @@ -1056,7 +1056,7 @@ // Submits a form using ajax. // This method serializes a form and sends it as POST body. submitForm: function(form, submitButton) { - if (this.handleMultipart(form)) { + if (this.handleMultipart(form, submitButton)) { return true; } var body = function() { @@ -1072,7 +1072,7 @@ // If the form contains multipart content this function will post // the form using an iframe instead of the regular ajax call // and bridge the output - transparently making this work as if it was an ajax call - handleMultipart: function (form) { + handleMultipart: function (form, submitButton) { if (form.enctype!="multipart/form-data") { // not handled, return false @@ -1105,6 +1105,20 @@ // reconfigure the form form.target=iframe.name; form.action=this.request.url; + + // create submitting button element + if (submitButton!=null) { + try { + var btn = document.createElement(""); + } catch (ex) { + var btn = document.createElement("input"); + btn.type="hidden"; + btn.name=submitButton; + btn.id=iframe.id+"-btn"; + btn.value="1"; + } + } + form.appendChild(btn); //submit the form into the iframe, response will be handled by the onload callback form.submit(); @@ -1136,8 +1150,8 @@ else iframe.removeEventListener("load", this.handleMultipartComplete, false); - // remove the iframe - setTimeout(function() { iframe.parentNode.removeChild(iframe); }, 250); + // remove the iframe and button elements + setTimeout(function() { var e=document.getElementById(iframe.id+"-btn"); if (e!=null) { e.parentNode.removeChild(e); } iframe.parentNode.removeChild(iframe); }, 250); }, // Processes the response
svn commit: r815616 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Wed Sep 16 05:51:39 2009 New Revision: 815616 URL: http://svn.apache.org/viewvc?rev=815616&view=rev Log: WICKET-2433 support multipart ajax in embedded forms Issue: WICKET-2433 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=815616&r1=815615&r2=815616&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 16 05:51:39 2009 @@ -1074,6 +1074,18 @@ // and bridge the output - transparently making this work as if it was an ajax call handleMultipart: function (form, submitButton) { + // find root form + if (form.tagName.toLowerCase() != "form") { + do { + form = form.parentNode; + } while(form.tagName.toLowerCase() != "form" && form.tagName.toLowerCase() != "body") + } + + if (form.tagName.toLowerCase() != "form") { + // no form in the hierarchy, cant handle multipart + return false; + } + if (form.enctype!="multipart/form-data") { // not handled, return false return false;
svn commit: r815617 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Wed Sep 16 05:52:31 2009 New Revision: 815617 URL: http://svn.apache.org/viewvc?rev=815617&view=rev Log: WICKET-2433 support multipart ajax in embedded forms Issue: WICKET-2433 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=815617&r1=815616&r2=815617&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 16 05:52:31 2009 @@ -1074,6 +1074,18 @@ // and bridge the output - transparently making this work as if it was an ajax call handleMultipart: function (form, submitButton) { + // find root form + if (form.tagName.toLowerCase() != "form") { + do { + form = form.parentNode; + } while(form.tagName.toLowerCase() != "form" && form.tagName.toLowerCase() != "body") + } + + if (form.tagName.toLowerCase() != "form") { + // no form in the hierarchy, cant handle multipart + return false; + } + if (form.enctype!="multipart/form-data") { // not handled, return false return false;
svn commit: r815620 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java
Author: ivaynberg Date: Wed Sep 16 06:12:28 2009 New Revision: 815620 URL: http://svn.apache.org/viewvc?rev=815620&view=rev Log: WICKET-2466 update javadoc Issue: WICKET-2466 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java?rev=815620&r1=815619&r2=815620&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java Wed Sep 16 06:12:28 2009 @@ -34,6 +34,7 @@ import org.apache.wicket.request.RequestParameters; import org.apache.wicket.request.target.coding.IRequestTargetUrlCodingStrategy; import org.apache.wicket.util.crypt.ICrypt; +import org.apache.wicket.util.crypt.KeyInSessionSunJceCryptFactory; import org.apache.wicket.util.string.AppendingStringBuffer; import org.apache.wicket.util.string.Strings; import org.apache.wicket.util.string.UrlUtils; @@ -46,10 +47,9 @@ * This is a request coding strategy which encrypts the URL and hence makes it impossible for users * to guess what is in the url and rebuild it manually. It uses the CryptFactory registered with the * application to encode and decode the URL. Hence, the coding algorithm must be a two-way one - * (reversible). Because the algorithm is reversible, URLs which were bookmarkable before will - * remain bookmarkable. + * (reversible). * - * To register the request coding strategy to need to do the following: + * To register the request coding strategy you need to do the following: * * * protected IRequestCycleProcessor newRequestCycleProcessor() @@ -68,13 +68,23 @@ * the URL. By default, for safety reasons a very simple WicketRuntimeException is thrown. The * original stack trace is only logged. * + * * Note: by default Wicket uses * {...@link org.apache.wicket.util.crypt.KeyInSessionSunJceCryptFactory} to encrypt the query-string. - * KeyInSessionSunJceCryptFactory creates a unique encryption key per session and and uses the - * session as persistence store. Hence stateless pages will create a session as well and are no - * longer stateless. You may avoid that by implementing your own ICryptFactory which e.g. uses an - * application wide encryption key and thus doesn't need a session. You can register your own - * ICryptFactory via Application.getSecuritySettings().setCryptFactory(). + * KeyInSessionSunJceCryptFactory creates a unique encryption key per session and uses the session + * as persistence store. Hence stateless pages will create a session as well and are no longer + * stateless. You may avoid that by implementing your own ICryptFactory which e.g. uses an + * application wide encryption key and thus doesn't need a session, but can potentially open your + * application to vulnerabilities such as CSRF attacks. You can register your own ICryptFactory via + * Application.getSecuritySettings().setCryptFactory(). + * + * + * Note: The usage of the default {...@link KeyInSessionSunJceCryptFactory} will also make all + * bookmarkable urls generated during the user's session non-bookmarkable because they will be + * encrypted using a session-relative encryption key; however, bookmarkable urls are still available + * through their mounts. + * + * * * @author Juergen Donnerstag */
svn commit: r815623 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java
Author: ivaynberg Date: Wed Sep 16 06:16:39 2009 New Revision: 815623 URL: http://svn.apache.org/viewvc?rev=815623&view=rev Log: WICKET-2466 update javadoc Issue: WICKET-2466 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java?rev=815623&r1=815622&r2=815623&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/CryptedUrlWebRequestCodingStrategy.java Wed Sep 16 06:16:39 2009 @@ -34,6 +34,7 @@ import org.apache.wicket.request.RequestParameters; import org.apache.wicket.request.target.coding.IRequestTargetUrlCodingStrategy; import org.apache.wicket.util.crypt.ICrypt; +import org.apache.wicket.util.crypt.KeyInSessionSunJceCryptFactory; import org.apache.wicket.util.string.AppendingStringBuffer; import org.apache.wicket.util.string.Strings; import org.apache.wicket.util.string.UrlUtils; @@ -46,10 +47,9 @@ * This is a request coding strategy which encrypts the URL and hence makes it impossible for users * to guess what is in the url and rebuild it manually. It uses the CryptFactory registered with the * application to encode and decode the URL. Hence, the coding algorithm must be a two-way one - * (reversible). Because the algorithm is reversible, URLs which were bookmarkable before will - * remain bookmarkable. + * (reversible). * - * To register the request coding strategy to need to do the following: + * To register the request coding strategy you need to do the following: * * * protected IRequestCycleProcessor newRequestCycleProcessor() @@ -68,13 +68,23 @@ * the URL. By default, for safety reasons a very simple WicketRuntimeException is thrown. The * original stack trace is only logged. * + * * Note: by default Wicket uses * {...@link org.apache.wicket.util.crypt.KeyInSessionSunJceCryptFactory} to encrypt the query-string. - * KeyInSessionSunJceCryptFactory creates a unique encryption key per session and and uses the - * session as persistence store. Hence stateless pages will create a session as well and are no - * longer stateless. You may avoid that by implementing your own ICryptFactory which e.g. uses an - * application wide encryption key and thus doesn't need a session. You can register your own - * ICryptFactory via Application.getSecuritySettings().setCryptFactory(). + * KeyInSessionSunJceCryptFactory creates a unique encryption key per session and uses the session + * as persistence store. Hence stateless pages will create a session as well and are no longer + * stateless. You may avoid that by implementing your own ICryptFactory which e.g. uses an + * application wide encryption key and thus doesn't need a session, but can potentially open your + * application to vulnerabilities such as CSRF attacks. You can register your own ICryptFactory via + * Application.getSecuritySettings().setCryptFactory(). + * + * + * Note: The usage of the default {...@link KeyInSessionSunJceCryptFactory} will also make all + * bookmarkable urls generated during the user's session non-bookmarkable because they will be + * encrypted using a session-relative encryption key; however, bookmarkable urls are still available + * through their mounts. + * + * * * @author Juergen Donnerstag */
svn commit: r815625 - in /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard: Wizard_zh_CN.xml Wizard_zh_TW.xml
Author: ivaynberg Date: Wed Sep 16 06:22:07 2009 New Revision: 815625 URL: http://svn.apache.org/viewvc?rev=815625&view=rev Log: WICKET-2462 - CN translations for wizard Issue: WICKET-2462 Added: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml (with props) wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml (with props) Added: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml?rev=815625&view=auto == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml (added) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml Wed Sep 16 06:22:07 2009 @@ -0,0 +1,28 @@ + + +http://java.sun.com/dtd/properties.dtd";> + + ä¸ä¸æ¥ + ä¸ä¸æ¥ + æå + åæ¶ + ç»æ + + æ æ³æ§è¡ä¸ä¸æ¥ + æ æ³æ§è¡æåä¸æ¥ + \ No newline at end of file Propchange: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml -- svn:mime-type = text/plain Added: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml?rev=815625&view=auto == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml (added) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml Wed Sep 16 06:22:07 2009 @@ -0,0 +1,28 @@ + + +http://java.sun.com/dtd/properties.dtd";> + + ä¸ä¸æ¥ + ä¸ä¸æ¥ + æå¾ + åæ¶ + çµæ + + ç¡æ³å·è¡ä¸ä¸æ¥ + ç¡æ³å·è¡æå¾ä¸æ¥ + \ No newline at end of file Propchange: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml -- svn:mime-type = text/plain
svn commit: r815626 - in /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard: Wizard_zh_CN.xml Wizard_zh_TW.xml
Author: ivaynberg Date: Wed Sep 16 06:22:43 2009 New Revision: 815626 URL: http://svn.apache.org/viewvc?rev=815626&view=rev Log: WICKET-2462 CN translations for wizard Issue: WICKET-2462 Added: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml (with props) wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml (with props) Added: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml?rev=815626&view=auto == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml (added) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml Wed Sep 16 06:22:43 2009 @@ -0,0 +1,28 @@ + + +http://java.sun.com/dtd/properties.dtd";> + + ä¸ä¸æ¥ + ä¸ä¸æ¥ + æå? + å?æ¶ + ç»æ? + + æ æ³æ§è¡ä¸ä¸æ¥ + æ æ³æ§è¡æå?ä¸æ¥ + \ No newline at end of file Propchange: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_CN.xml -- svn:mime-type = text/plain Added: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml?rev=815626&view=auto == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml (added) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml Wed Sep 16 06:22:43 2009 @@ -0,0 +1,28 @@ + + +http://java.sun.com/dtd/properties.dtd";> + + ä¸ä¸æ¥ + ä¸ä¸æ¥ + æå¾ + å?æ¶ + çµ?æ? + + ç¡æ³å·è¡ä¸ä¸æ¥ + ç¡æ³å·è¡æå¾ä¸æ¥ + \ No newline at end of file Propchange: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/Wizard_zh_TW.xml -- svn:mime-type = text/plain
svn commit: r815630 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java
Author: ivaynberg Date: Wed Sep 16 06:37:55 2009 New Revision: 815630 URL: http://svn.apache.org/viewvc?rev=815630&view=rev Log: WICKET-2469 make diskfileitemfactory customizable Issue: WICKET-2469 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java?rev=815630&r1=815629&r2=815630&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java Wed Sep 16 06:37:55 2009 @@ -31,6 +31,7 @@ import org.apache.wicket.util.lang.Bytes; import org.apache.wicket.util.upload.DiskFileItemFactory; import org.apache.wicket.util.upload.FileItem; +import org.apache.wicket.util.upload.FileItemFactory; import org.apache.wicket.util.upload.FileUploadException; import org.apache.wicket.util.upload.ServletFileUpload; import org.apache.wicket.util.upload.ServletRequestContext; @@ -65,7 +66,9 @@ /** -* Constructor +* Constructor. +* +* This constructor will use {...@link DiskFileItemFactory} to store uploads. * * @param maxSize *the maximum size allowed for this request @@ -77,6 +80,25 @@ public MultipartServletWebRequest(HttpServletRequest request, Bytes maxSize) throws FileUploadException { + this(request, maxSize, new DiskFileItemFactory()); + } + + /** +* Constructor +* +* @param maxSize +*the maximum size allowed for this request +* @param request +*the servlet request +* @param factory +*{...@link DiskFileItemFactory} to use when creating file items used to represent +*uploaded files +* @throws FileUploadException +* Thrown if something goes wrong with upload +*/ + public MultipartServletWebRequest(HttpServletRequest request, Bytes maxSize, + FileItemFactory factory) throws FileUploadException + { super(request); if (maxSize == null) @@ -91,7 +113,6 @@ throw new IllegalStateException("ServletRequest does not contain multipart content"); } - DiskFileItemFactory factory = new DiskFileItemFactory(); // Configure the factory here, if desired. ServletFileUpload upload = new ServletFileUpload(factory);
svn commit: r815631 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java
Author: ivaynberg Date: Wed Sep 16 06:38:53 2009 New Revision: 815631 URL: http://svn.apache.org/viewvc?rev=815631&view=rev Log: WICKET-2469 make diskfileitemfactory customizable Issue: WICKET-2469 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java?rev=815631&r1=815630&r2=815631&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/MultipartServletWebRequest.java Wed Sep 16 06:38:53 2009 @@ -31,6 +31,7 @@ import org.apache.wicket.util.lang.Bytes; import org.apache.wicket.util.upload.DiskFileItemFactory; import org.apache.wicket.util.upload.FileItem; +import org.apache.wicket.util.upload.FileItemFactory; import org.apache.wicket.util.upload.FileUploadException; import org.apache.wicket.util.upload.ServletFileUpload; import org.apache.wicket.util.upload.ServletRequestContext; @@ -65,7 +66,9 @@ /** -* Constructor +* Constructor. +* +* This constructor will use {...@link DiskFileItemFactory} to store uploads. * * @param maxSize *the maximum size allowed for this request @@ -77,6 +80,25 @@ public MultipartServletWebRequest(HttpServletRequest request, Bytes maxSize) throws FileUploadException { + this(request, maxSize, new DiskFileItemFactory()); + } + + /** +* Constructor +* +* @param maxSize +*the maximum size allowed for this request +* @param request +*the servlet request +* @param factory +*{...@link DiskFileItemFactory} to use when creating file items used to represent +*uploaded files +* @throws FileUploadException +* Thrown if something goes wrong with upload +*/ + public MultipartServletWebRequest(HttpServletRequest request, Bytes maxSize, + FileItemFactory factory) throws FileUploadException + { super(request); if (maxSize == null) @@ -91,7 +113,6 @@ throw new IllegalStateException("ServletRequest does not contain multipart content"); } - DiskFileItemFactory factory = new DiskFileItemFactory(); // Configure the factory here, if desired. ServletFileUpload upload = new ServletFileUpload(factory);
svn commit: r815838 - in /wicket/trunk: testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/ wicket-quickstart/src/main/java/org/apache/wicket/quickstart/
Author: ivaynberg Date: Wed Sep 16 15:30:25 2009 New Revision: 815838 URL: http://svn.apache.org/viewvc?rev=815838&view=rev Log: WICKET-2470 Modified: wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartApplication.java wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartSession.java Modified: wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java URL: http://svn.apache.org/viewvc/wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java?rev=815838&r1=815837&r2=815838&view=diff == --- wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java (original) +++ wicket/trunk/testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/Home.java Wed Sep 16 15:30:25 2009 @@ -57,7 +57,8 @@ import org.apache.wicket.util.convert.ConversionException; import org.apache.wicket.util.convert.IConverter; import org.apache.wicket.util.convert.MaskConverter; -import org.apache.wicket.validation.validator.NumberValidator; +import org.apache.wicket.validation.validator.MinimumValidator; +import org.apache.wicket.validation.validator.RangeValidator; import org.apache.wicket.version.undo.Change; /** @@ -124,13 +125,13 @@ add(stringTextField); TextField integerTextField = new TextField("integerProperty", Integer.class); - add(integerTextField.add(NumberValidator.POSITIVE)); + add(integerTextField.add(new MinimumValidator(0))); add(new TextField("doubleProperty", Double.class)); WebMarkupContainer dateLabel = new WebMarkupContainer("dateLabel"); add(dateLabel); TextField datePropertyTextField = new TextField("dateProperty", Date.class); add(datePropertyTextField); - add(new TextField("integerInRangeProperty", Integer.class).add(NumberValidator.range( + add(new TextField("integerInRangeProperty", Integer.class).add(new RangeValidator( 0, 100))); add(new CheckBox("booleanProperty")); RadioChoice rc = new RadioChoice("numberRadioChoice", NUMBERS).setSuffix(""); Modified: wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartApplication.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartApplication.java?rev=815838&r1=815837&r2=815838&view=diff == --- wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartApplication.java (original) +++ wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartApplication.java Wed Sep 16 15:30:25 2009 @@ -45,6 +45,7 @@ /** * @see org.apache.wicket.Application#getHomePage() */ + @Override public Class getHomePage() { return Index.class; @@ -53,14 +54,16 @@ /** * @see org.apache.wicket.protocol.http.WebApplication#newSession(Request, Response) */ + @Override public Session newSession(Request request, Response response) { - return new QuickStartSession(QuickStartApplication.this, request); + return new QuickStartSession(request); } /** * @see org.apache.wicket.protocol.http.WebApplication#init() */ + @Override protected void init() { // put any configuration here Modified: wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartSession.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartSession.java?rev=815838&r1=815837&r2=815838&view=diff == --- wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartSession.java (original) +++ wicket/trunk/wicket-quickstart/src/main/java/org/apache/wicket/quickstart/QuickStartSession.java Wed Sep 16 15:30:25 2009 @@ -17,7 +17,6 @@ package org.apache.wicket.quickstart; import org.apache.wicket.Request; -import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket
svn commit: r817872 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
Author: ivaynberg Date: Tue Sep 22 22:37:07 2009 New Revision: 817872 URL: http://svn.apache.org/viewvc?rev=817872&view=rev Log: WICKET-2477 Issue: WICKET-2477 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=817872&r1=817871&r2=817872&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Tue Sep 22 22:37:07 2009 @@ -290,4 +290,17 @@ { super.onModelChanging(); } + + /** +* @see org.apache.wicket.Component#onDetach() +*/ + @Override + protected void onDetach() + { + if (choices != null) + { + choices.detach(); + } + super.onDetach(); + } }
svn commit: r817873 - /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java
Author: ivaynberg Date: Tue Sep 22 22:37:33 2009 New Revision: 817873 URL: http://svn.apache.org/viewvc?rev=817873&view=rev Log: WICKET_2477 Issue: WICKET-2477 Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java?rev=817873&r1=817872&r2=817873&view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableChoiceLabel.java Tue Sep 22 22:37:33 2009 @@ -290,4 +290,18 @@ { super.onModelChanging(); } + + /** +* @see org.apache.wicket.Component#onDetach() +*/ + @Override + protected void onDetach() + { + if (choices != null) + { + choices.detach(); + } + super.onDetach(); + } + }
svn commit: r817874 - /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
Author: ivaynberg Date: Tue Sep 22 22:41:04 2009 New Revision: 817874 URL: http://svn.apache.org/viewvc?rev=817874&view=rev Log: WICKET-2478 Issue: WICKET-2478 Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java?rev=817874&r1=817873&r2=817874&view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Tue Sep 22 22:41:04 2009 @@ -371,13 +371,20 @@ tabsVisibilityCache = new Boolean[tabs.size()]; } - Boolean visible = tabsVisibilityCache[tabIndex]; - if (visible == null) + if (tabsVisibilityCache.length > 0) { - visible = tabs.get(tabIndex).isVisible(); - tabsVisibilityCache[tabIndex] = visible; + Boolean visible = tabsVisibilityCache[tabIndex]; + if (visible == null) + { + visible = tabs.get(tabIndex).isVisible(); + tabsVisibilityCache[tabIndex] = visible; + } + return visible; + } + else + { + return false; } - return visible; } @Override
svn commit: r817875 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
Author: ivaynberg Date: Tue Sep 22 22:41:59 2009 New Revision: 817875 URL: http://svn.apache.org/viewvc?rev=817875&view=rev Log: WICKET-2478 Issue: WICKET-2478 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java 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=817875&r1=817874&r2=817875&view=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 Tue Sep 22 22:41:59 2009 @@ -371,13 +371,20 @@ tabsVisibilityCache = new Boolean[tabs.size()]; } - Boolean visible = tabsVisibilityCache[tabIndex]; - if (visible == null) + if (tabsVisibilityCache.length > 0) { - visible = tabs.get(tabIndex).isVisible(); - tabsVisibilityCache[tabIndex] = visible; + Boolean visible = tabsVisibilityCache[tabIndex]; + if (visible == null) + { + visible = tabs.get(tabIndex).isVisible(); + tabsVisibilityCache[tabIndex] = visible; + } + return visible; + } + else + { + return false; } - return visible; } @Override
svn commit: r817898 - /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java
Author: ivaynberg Date: Tue Sep 22 23:19:54 2009 New Revision: 817898 URL: http://svn.apache.org/viewvc?rev=817898&view=rev Log: WICKET-2483 Issue: WICKET-2483 Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java?rev=817898&r1=817897&r2=817898&view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java Tue Sep 22 23:19:54 2009 @@ -17,6 +17,7 @@ package org.apache.wicket.extensions.wizard; import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -30,9 +31,8 @@ * optional by using {...@link ICondition}. The wizard is initialized with a wizard model through * calling method {...@link Wizard#init(IWizardModel)}. * - * Steps can be added to this model directly using either the - * {...@link #add(IWizardStep) normal add method} or - * {...@link #add(IWizardStep, ICondition) the conditional add method}. + * Steps can be added to this model directly using either the {...@link #add(IWizardStep) normal add + * method} or {...@link #add(IWizardStep, ICondition) the conditional add method}. * * * @@ -99,8 +99,8 @@ /** * Adds the next step to the wizard. If the {...@link WizardStep} implements {...@link ICondition}, -* then this method is equivalent to calling -* {...@link #add(IWizardStep, ICondition) add(step, (ICondition)step)}. +* then this method is equivalent to calling {...@link #add(IWizardStep, ICondition) add(step, +* (ICondition)step)}. * * @param step *the step to added. @@ -244,11 +244,10 @@ /** * Returns true if all the steps in the wizard return true from -* {...@link IWizardStep#isComplete}. This is primarily used to determine if the last button can -* be enabled. +* {...@link IWizardStep#isComplete}. This is primarily used to determine if the last button can be +* enabled. * -* @return true if all the steps in the wizard are complete, false -* otherwise. +* @return true if all the steps in the wizard are complete, false otherwise. */ protected final boolean allStepsComplete() { @@ -302,4 +301,16 @@ throw new IllegalStateException("Wizard contains no more visible steps"); } + + /** +* Gets conditions. +* +* @return unmodifiable list of conditions +*/ + public List getConditions() + { + return Collections.unmodifiableList(conditions); + } + + } \ No newline at end of file
svn commit: r817899 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java
Author: ivaynberg Date: Tue Sep 22 23:20:07 2009 New Revision: 817899 URL: http://svn.apache.org/viewvc?rev=817899&view=rev Log: WICKET-2483 Issue: WICKET-2483 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java?rev=817899&r1=817898&r2=817899&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/WizardModel.java Tue Sep 22 23:20:07 2009 @@ -17,6 +17,7 @@ package org.apache.wicket.extensions.wizard; import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -30,9 +31,8 @@ * optional by using {...@link ICondition}. The wizard is initialized with a wizard model through * calling method {...@link Wizard#init(IWizardModel)}. * - * Steps can be added to this model directly using either the - * {...@link #add(IWizardStep) normal add method} or - * {...@link #add(IWizardStep, ICondition) the conditional add method}. + * Steps can be added to this model directly using either the {...@link #add(IWizardStep) normal add + * method} or {...@link #add(IWizardStep, ICondition) the conditional add method}. * * * @@ -99,8 +99,8 @@ /** * Adds the next step to the wizard. If the {...@link WizardStep} implements {...@link ICondition}, -* then this method is equivalent to calling -* {...@link #add(IWizardStep, ICondition) add(step, (ICondition)step)}. +* then this method is equivalent to calling {...@link #add(IWizardStep, ICondition) add(step, +* (ICondition)step)}. * * @param step *the step to added. @@ -244,11 +244,10 @@ /** * Returns true if all the steps in the wizard return true from -* {...@link IWizardStep#isComplete}. This is primarily used to determine if the last button can -* be enabled. +* {...@link IWizardStep#isComplete}. This is primarily used to determine if the last button can be +* enabled. * -* @return true if all the steps in the wizard are complete, false -* otherwise. +* @return true if all the steps in the wizard are complete, false otherwise. */ protected final boolean allStepsComplete() { @@ -302,4 +301,15 @@ throw new IllegalStateException("Wizard contains no more visible steps"); } + + /** +* Gets conditions. +* +* @return unmodifiable list of conditions +*/ + public List getConditions() + { + return Collections.unmodifiableList(conditions); + } + } \ No newline at end of file
svn commit: r817901 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
Author: ivaynberg Date: Tue Sep 22 23:42:11 2009 New Revision: 817901 URL: http://svn.apache.org/viewvc?rev=817901&view=rev Log: WICKET-2435 Issue: WICKET-2435 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java 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=817901&r1=817900&r2=817901&view=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 Tue Sep 22 23:42:11 2009 @@ -110,17 +110,7 @@ } }; - WebMarkupContainer tabsContainer = new WebMarkupContainer("tabs-container") - { - private static final long serialVersionUID = 1L; - - @Override - protected void onComponentTag(ComponentTag tag) - { - super.onComponentTag(tag); - tag.put("class", getTabContainerCssClass()); - } - }; + WebMarkupContainer tabsContainer = newTabsContainer("tabs-container"); add(tabsContainer); // add the loop used to generate tab names @@ -148,6 +138,21 @@ }); } + protected WebMarkupContainer newTabsContainer(String id) + { + return new WebMarkupContainer(id) + { + private static final long serialVersionUID = 1L; + + @Override + protected void onComponentTag(ComponentTag tag) + { + super.onComponentTag(tag); + tag.put("class", getTabContainerCssClass()); + } + }; + } + /** * Generates a loop item used to represent a specific tab's li element. * @@ -296,7 +301,7 @@ */ protected WebMarkupContainer newLink(String linkId, final int index) { - return new Link(linkId) + return new Link(linkId) { private static final long serialVersionUID = 1L;
svn commit: r817902 - /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
Author: ivaynberg Date: Tue Sep 22 23:42:35 2009 New Revision: 817902 URL: http://svn.apache.org/viewvc?rev=817902&view=rev Log: WICKET-2435 Issue: WICKET-2435 Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java?rev=817902&r1=817901&r2=817902&view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Tue Sep 22 23:42:35 2009 @@ -110,17 +110,7 @@ } }; - WebMarkupContainer tabsContainer = new WebMarkupContainer("tabs-container") - { - private static final long serialVersionUID = 1L; - - @Override - protected void onComponentTag(ComponentTag tag) - { - super.onComponentTag(tag); - tag.put("class", getTabContainerCssClass()); - } - }; + WebMarkupContainer tabsContainer = newTabsContainer("tabs-container"); add(tabsContainer); // add the loop used to generate tab names @@ -148,6 +138,21 @@ }); } + protected WebMarkupContainer newTabsContainer(String id) + { + return new WebMarkupContainer(id) + { + private static final long serialVersionUID = 1L; + + @Override + protected void onComponentTag(ComponentTag tag) + { + super.onComponentTag(tag); + tag.put("class", getTabContainerCssClass()); + } + }; + } + /** * Generates a loop item used to represent a specific tab's li element. * @@ -296,7 +301,7 @@ */ protected WebMarkupContainer newLink(String linkId, final int index) { - return new Link(linkId) + return new Link(linkId) { private static final long serialVersionUID = 1L;
svn commit: r817903 - /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
Author: ivaynberg Date: Tue Sep 22 23:44:05 2009 New Revision: 817903 URL: http://svn.apache.org/viewvc?rev=817903&view=rev Log: WICKET-2435 Issue: WICKET-2435 Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java?rev=817903&r1=817902&r2=817903&view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java Tue Sep 22 23:44:05 2009 @@ -110,7 +110,7 @@ } }; - WebMarkupContainer tabsContainer = newTabsContainer("tabs-container"); + WebMarkupContainer tabsContainer = newTabsContainer("tabs-container"); add(tabsContainer); // add the loop used to generate tab names @@ -138,6 +138,14 @@ }); } + /** +* Generates the container for all tabs. The default container automatically adds the css +* class attribute based on the return value of {...@link #getTabContainerCssClass()} +* +* @param id +*container id +* @return container +*/ protected WebMarkupContainer newTabsContainer(String id) { return new WebMarkupContainer(id) @@ -152,7 +160,7 @@ } }; } - + /** * Generates a loop item used to represent a specific tab's li element. *
svn commit: r817904 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java
Author: ivaynberg Date: Tue Sep 22 23:44:19 2009 New Revision: 817904 URL: http://svn.apache.org/viewvc?rev=817904&view=rev Log: WICKET-2435 Issue: WICKET-2435 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs/TabbedPanel.java 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=817904&r1=817903&r2=817904&view=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 Tue Sep 22 23:44:19 2009 @@ -110,7 +110,7 @@ } }; - WebMarkupContainer tabsContainer = newTabsContainer("tabs-container"); + WebMarkupContainer tabsContainer = newTabsContainer("tabs-container"); add(tabsContainer); // add the loop used to generate tab names @@ -138,6 +138,14 @@ }); } + /** +* Generates the container for all tabs. The default container automatically adds the css +* class attribute based on the return value of {...@link #getTabContainerCssClass()} +* +* @param id +*container id +* @return container +*/ protected WebMarkupContainer newTabsContainer(String id) { return new WebMarkupContainer(id) @@ -152,7 +160,7 @@ } }; } - + /** * Generates a loop item used to represent a specific tab's li element. *
svn commit: r817906 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java
Author: ivaynberg Date: Tue Sep 22 23:49:50 2009 New Revision: 817906 URL: http://svn.apache.org/viewvc?rev=817906&view=rev Log: WICKET-2461 Issue: WICKET-2461 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java?rev=817906&r1=817905&r2=817906&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java Tue Sep 22 23:49:50 2009 @@ -17,7 +17,6 @@ package org.apache.wicket.ajax.markup.html.navigation.paging; import org.apache.wicket.Component; -import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.ajax.AjaxEventBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.IAjaxCallDecorator; @@ -77,14 +76,13 @@ // find the PagingNavigator parent of this link AjaxPagingNavigator navigator = ((Component)owner).findParent(AjaxPagingNavigator.class); - if (navigator == null) + + // if this is embedded inside a navigator + if (navigator != null) { - throw new WicketRuntimeException( - "Unable to find AjaxPagingNavigator component in hierarchy starting from " + owner); + // tell the PagingNavigator to update the IPageable + navigator.onAjaxEvent(target); } - - // tell the PagingNavigator to update the IPageable - navigator.onAjaxEvent(target); } /**
svn commit: r817907 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java
Author: ivaynberg Date: Tue Sep 22 23:50:18 2009 New Revision: 817907 URL: http://svn.apache.org/viewvc?rev=817907&view=rev Log: WICKET-2461 Issue: WICKET-2461 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java?rev=817907&r1=817906&r2=817907&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/markup/html/navigation/paging/AjaxPagingNavigationBehavior.java Tue Sep 22 23:50:18 2009 @@ -17,7 +17,6 @@ package org.apache.wicket.ajax.markup.html.navigation.paging; import org.apache.wicket.Component; -import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.ajax.AjaxEventBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.IAjaxCallDecorator; @@ -77,14 +76,13 @@ // find the PagingNavigator parent of this link AjaxPagingNavigator navigator = ((Component)owner).findParent(AjaxPagingNavigator.class); - if (navigator == null) + + // if this is embedded inside a navigator + if (navigator != null) { - throw new WicketRuntimeException( - "Unable to find AjaxPagingNavigator component in hierarchy starting from " + owner); + // tell the PagingNavigator to update the IPageable + navigator.onAjaxEvent(target); } - - // tell the PagingNavigator to update the IPageable - navigator.onAjaxEvent(target); } /**
svn commit: r817920 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java
Author: ivaynberg Date: Wed Sep 23 01:39:57 2009 New Revision: 817920 URL: http://svn.apache.org/viewvc?rev=817920&view=rev Log: WICKET-2458 Issue: WICKET-2458 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java?rev=817920&r1=817919&r2=817920&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java Wed Sep 23 01:39:57 2009 @@ -76,7 +76,7 @@ /** -* Escape quotes and double quotes so that they can be part of e.g. an alert call. +* Escape single and double quotes so that they can be part of e.g. an alert call. * * @param input *input @@ -88,6 +88,7 @@ if (s != null) { s = Strings.replaceAll(s, "'", "\\'"); + s = Strings.replaceAll(s, "\"", "\\\""); } return s; }
svn commit: r817921 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java
Author: ivaynberg Date: Wed Sep 23 01:40:48 2009 New Revision: 817921 URL: http://svn.apache.org/viewvc?rev=817921&view=rev Log: WICKET-2458 Issue: WICKET-2458 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java?rev=817921&r1=817920&r2=817921&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/util/string/JavascriptUtils.java Wed Sep 23 01:40:48 2009 @@ -76,7 +76,7 @@ /** -* Escape quotes and double quotes so that they can be part of e.g. an alert call. +* Escape single and double quotes so that they can be part of e.g. an alert call. * * @param input *input @@ -88,6 +88,7 @@ if (s != null) { s = Strings.replaceAll(s, "'", "\\'"); + s = Strings.replaceAll(s, "\"", "\\\""); } return s; }
svn commit: r817922 - /wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java
Author: ivaynberg Date: Wed Sep 23 01:50:23 2009 New Revision: 817922 URL: http://svn.apache.org/viewvc?rev=817922&view=rev Log: WICKET-2456 Issue: WICKET-2456 Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java Modified: wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java?rev=817922&r1=817921&r2=817922&view=diff == --- wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java (original) +++ wicket/branches/wicket-1.4.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java Wed Sep 23 01:50:23 2009 @@ -32,11 +32,8 @@ /** * A TextField that is mapped to a java.util.Date object. * - * If you provide a SimpleDateFormat pattern, it will both parse and validate the text - * field according to it. - * - * If you don't, it is the same as creating a TextField with - * java.util.Date as it's type (it will get the pattern from the user's locale) + * If no date pattern is explicitly specified, the default DateFormat.SHORT pattern for + * the current locale will be used. * * @author Stefan Kanev * @author Igor Vaynberg (ivaynberg) @@ -47,8 +44,6 @@ private static final long serialVersionUID = 1L; - // XXX i18n: we can probably make this lazy and localize according to - // session locale private static final String DEFAULT_PATTERN = "MM/dd/"; /**
svn commit: r817923 - /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java
Author: ivaynberg Date: Wed Sep 23 01:50:47 2009 New Revision: 817923 URL: http://svn.apache.org/viewvc?rev=817923&view=rev Log: WICKET-2456 Issue: WICKET-2456 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java?rev=817923&r1=817922&r2=817923&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/DateTextField.java Wed Sep 23 01:50:47 2009 @@ -32,11 +32,8 @@ /** * A TextField that is mapped to a java.util.Date object. * - * If you provide a SimpleDateFormat pattern, it will both parse and validate the text - * field according to it. - * - * If you don't, it is the same as creating a TextField with - * java.util.Date as it's type (it will get the pattern from the user's locale) + * If no date pattern is explicitly specified, the default DateFormat.SHORT pattern for + * the current locale will be used. * * @author Stefan Kanev * @author Igor Vaynberg (ivaynberg) @@ -47,8 +44,6 @@ private static final long serialVersionUID = 1L; - // XXX i18n: we can probably make this lazy and localize according to - // session locale private static final String DEFAULT_PATTERN = "MM/dd/"; /**
svn commit: r817930 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java
Author: ivaynberg Date: Wed Sep 23 02:01:17 2009 New Revision: 817930 URL: http://svn.apache.org/viewvc?rev=817930&view=rev Log: WICKET-2434 Issue: WICKET-2434 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java?rev=817930&r1=817929&r2=817930&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java Wed Sep 23 02:01:17 2009 @@ -39,6 +39,10 @@ public WebRequestEncoder(AppendingStringBuffer url) { this.url = url; + if (url.indexOf("?") > 0) + { + firstParameter = false; + } } /**
svn commit: r817931 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java
Author: ivaynberg Date: Wed Sep 23 02:15:19 2009 New Revision: 817931 URL: http://svn.apache.org/viewvc?rev=817931&view=rev Log: WICKET-2434 Issue: WICKET-2434 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java?rev=817931&r1=817930&r2=817931&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java Wed Sep 23 02:15:19 2009 @@ -38,7 +38,12 @@ */ public WebRequestEncoder(AppendingStringBuffer url) { + if (url.indexOf("?") > 0) + { + firstParameter = false; + } this.url = url; + } /**
svn commit: r817932 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java
Author: ivaynberg Date: Wed Sep 23 02:26:48 2009 New Revision: 817932 URL: http://svn.apache.org/viewvc?rev=817932&view=rev Log: WICKET-2434 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java?rev=817932&r1=817931&r2=817932&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java Wed Sep 23 02:26:48 2009 @@ -38,7 +38,7 @@ */ public WebRequestEncoder(AppendingStringBuffer url) { - if (url.indexOf("?") > 0) + if (url.indexOf("?") >= 0) { firstParameter = false; }
svn commit: r817933 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java
Author: ivaynberg Date: Wed Sep 23 02:26:55 2009 New Revision: 817933 URL: http://svn.apache.org/viewvc?rev=817933&view=rev Log: WICKET-2434 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java?rev=817933&r1=817932&r2=817933&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/request/target/coding/WebRequestEncoder.java Wed Sep 23 02:26:55 2009 @@ -39,7 +39,7 @@ public WebRequestEncoder(AppendingStringBuffer url) { this.url = url; - if (url.indexOf("?") > 0) + if (url.indexOf("?") >= 0) { firstParameter = false; }
svn commit: r817935 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Wed Sep 23 02:38:57 2009 New Revision: 817935 URL: http://svn.apache.org/viewvc?rev=817935&view=rev Log: WICKET-2454 Issue: WICKET-2454 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=817935&r1=817934&r2=817935&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 23 02:38:57 2009 @@ -1411,7 +1411,9 @@ var xmldoc; if (window.ActiveXObject) { xmldoc = new ActiveXObject("Microsoft.XMLDOM"); - xmldoc.loadXML(text); + if (!xmldoc.loadXML(text)) { + Wicket.Log.error("Error parsing response: "+text); + } } else { var parser = new DOMParser(); xmldoc = parser.parseFromString(text, "text/xml");
svn commit: r817936 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
Author: ivaynberg Date: Wed Sep 23 02:42:48 2009 New Revision: 817936 URL: http://svn.apache.org/viewvc?rev=817936&view=rev Log: WICKET-2454 Issue: WICKET-2454 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=817936&r1=817935&r2=817936&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Wed Sep 23 02:42:48 2009 @@ -1410,8 +1410,10 @@ // build a DOM tree of the contribution var xmldoc; if (window.ActiveXObject) { - xmldoc = new ActiveXObject("Microsoft.XMLDOM"); - xmldoc.loadXML(text); + xmldoc = new ActiveXObject("Microsoft.XMLDOM"); + if (!xmldoc.loadXML(text)) { + Wicket.Log.error("Error parsing response: "+text); + } } else { var parser = new DOMParser(); xmldoc = parser.parseFromString(text, "text/xml");
svn commit: r817963 - in /wicket/branches/wicket-1.4.x/wicket-guice: .settings/ src/main/java/org/apache/wicket/guice/
Author: ivaynberg Date: Wed Sep 23 04:50:17 2009 New Revision: 817963 URL: http://svn.apache.org/viewvc?rev=817963&view=rev Log: WICKET-2120 Modified: wicket/branches/wicket-1.4.x/wicket-guice/.settings/org.eclipse.jdt.core.prefs wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/InjectionFlagCachingGuiceComponentInjector.java Modified: wicket/branches/wicket-1.4.x/wicket-guice/.settings/org.eclipse.jdt.core.prefs URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-guice/.settings/org.eclipse.jdt.core.prefs?rev=817963&r1=817962&r2=817963&view=diff == --- wicket/branches/wicket-1.4.x/wicket-guice/.settings/org.eclipse.jdt.core.prefs (original) +++ wicket/branches/wicket-1.4.x/wicket-guice/.settings/org.eclipse.jdt.core.prefs Wed Sep 23 04:50:17 2009 @@ -1,4 +1,4 @@ -#Sun Jul 01 09:58:45 PDT 2007 +#Wed Aug 26 08:14:09 PDT 2009 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 Modified: wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java?rev=817963&r1=817962&r2=817963&view=diff == --- wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java (original) +++ wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java Wed Sep 23 04:50:17 2009 @@ -195,27 +195,33 @@ inject(component); } - private Annotation findBindingAnnotation(Annotation[] annotations) + /** +* +* @param annotations +* @return +* @throws MoreThanOneBindingException +*/ + public static Annotation findBindingAnnotation(final Annotation[] annotations) throws MoreThanOneBindingException { Annotation bindingAnnotation = null; // Work out if we have a BindingAnnotation on this parameter. - for (int i = 0; i < annotations.length; i++) + for (Annotation annotation : annotations) { - if (annotations[i].annotationType().getAnnotation(BindingAnnotation.class) != null) + if (annotation.annotationType().getAnnotation(BindingAnnotation.class) != null) { if (bindingAnnotation != null) { throw new MoreThanOneBindingException(); } - bindingAnnotation = annotations[i]; + bindingAnnotation = annotation; } } return bindingAnnotation; } - private static class MoreThanOneBindingException extends Exception + public static class MoreThanOneBindingException extends Exception { private static final long serialVersionUID = 1L; } Modified: wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java?rev=817963&r1=817962&r2=817963&view=diff == --- wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java (original) +++ wicket/branches/wicket-1.4.x/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java Wed Sep 23 04:50:17 2009 @@ -42,7 +42,7 @@ /** index of argument in the method being injected, or -1 for field */ private final int argIndex; - GuiceProxyTargetLocator(Field field, Annotation bindingAnnotation, boolean optional) + public GuiceProxyTargetLocator(Field field, Annotation bindingAnnotation, boolean optional) { this.bindingAnnotation = bindingAnnotation; this.optional = optional; @@ -52,7 +52,7 @@ argIndex = -1; } - GuiceProxyTargetLocator(Method method, int argIndex, Annotation bindingAnnotation, + public GuiceProxyTargetLocator(Method method, int argIndex, Annotation bindingAnnotatio
svn commit: r817964 - in /wicket/trunk/wicket-guice: .settings/ src/main/java/org/apache/wicket/guice/
Author: ivaynberg Date: Wed Sep 23 04:50:33 2009 New Revision: 817964 URL: http://svn.apache.org/viewvc?rev=817964&view=rev Log: WICKET-2120 Modified: wicket/trunk/wicket-guice/.settings/org.eclipse.jdt.core.prefs wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/InjectionFlagCachingGuiceComponentInjector.java Modified: wicket/trunk/wicket-guice/.settings/org.eclipse.jdt.core.prefs URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-guice/.settings/org.eclipse.jdt.core.prefs?rev=817964&r1=817963&r2=817964&view=diff == --- wicket/trunk/wicket-guice/.settings/org.eclipse.jdt.core.prefs (original) +++ wicket/trunk/wicket-guice/.settings/org.eclipse.jdt.core.prefs Wed Sep 23 04:50:33 2009 @@ -1,4 +1,4 @@ -#Sun Jul 01 09:58:45 PDT 2007 +#Wed Aug 26 08:14:09 PDT 2009 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.compliance=1.5 Modified: wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java?rev=817964&r1=817963&r2=817964&view=diff == --- wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java (original) +++ wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceComponentInjector.java Wed Sep 23 04:50:33 2009 @@ -195,27 +195,33 @@ inject(component); } - private Annotation findBindingAnnotation(Annotation[] annotations) + /** +* +* @param annotations +* @return +* @throws MoreThanOneBindingException +*/ + public static Annotation findBindingAnnotation(final Annotation[] annotations) throws MoreThanOneBindingException { Annotation bindingAnnotation = null; // Work out if we have a BindingAnnotation on this parameter. - for (int i = 0; i < annotations.length; i++) + for (Annotation annotation : annotations) { - if (annotations[i].annotationType().getAnnotation(BindingAnnotation.class) != null) + if (annotation.annotationType().getAnnotation(BindingAnnotation.class) != null) { if (bindingAnnotation != null) { throw new MoreThanOneBindingException(); } - bindingAnnotation = annotations[i]; + bindingAnnotation = annotation; } } return bindingAnnotation; } - private static class MoreThanOneBindingException extends Exception + public static class MoreThanOneBindingException extends Exception { private static final long serialVersionUID = 1L; } Modified: wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java?rev=817964&r1=817963&r2=817964&view=diff == --- wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java (original) +++ wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/GuiceProxyTargetLocator.java Wed Sep 23 04:50:33 2009 @@ -42,7 +42,7 @@ /** index of argument in the method being injected, or -1 for field */ private final int argIndex; - GuiceProxyTargetLocator(Field field, Annotation bindingAnnotation, boolean optional) + public GuiceProxyTargetLocator(Field field, Annotation bindingAnnotation, boolean optional) { this.bindingAnnotation = bindingAnnotation; this.optional = optional; @@ -52,7 +52,7 @@ argIndex = -1; } - GuiceProxyTargetLocator(Method method, int argIndex, Annotation bindingAnnotation, + public GuiceProxyTargetLocator(Method method, int argIndex, Annotation bindingAnnotation, boolean optional) { this.bindingAnnotation = bindingAnnotation; Modified: wicket/trunk/wicket-guice/src/main/java/org/apache/wicket/guice/InjectionFlagCachingGuiceComponentInjector.java URL: http://svn.apache.or
svn commit: r818380 - in /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket: ./ markup/html/internal/ markup/resolver/
Author: ivaynberg Date: Thu Sep 24 06:41:12 2009 New Revision: 818380 URL: http://svn.apache.org/viewvc?rev=818380&view=rev Log: WICKET-2485 IComponentResolvers are not supported inside wicket:enclosure Issue: WICKET-2485 Added: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java (with props) wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/DirectChildTagIterator.java (with props) wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/ResponseBufferZone.java (with props) wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/resolver/ComponentResolvers.java (with props) Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MarkupContainer.java wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MarkupContainer.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?rev=818380&r1=818379&r2=818380&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MarkupContainer.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/MarkupContainer.java Thu Sep 24 06:41:12 2009 @@ -29,7 +29,7 @@ import org.apache.wicket.markup.MarkupNotFoundException; import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.WicketTag; -import org.apache.wicket.markup.resolver.IComponentResolver; +import org.apache.wicket.markup.resolver.ComponentResolvers; import org.apache.wicket.model.IComponentInheritedModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.IWrapModel; @@ -1415,33 +1415,9 @@ } else { - // 2rd try: Components like Border and Panel might implement - // the ComponentResolver interface as well. - MarkupContainer container = this; - while (container != null) + if (ComponentResolvers.resolve(getApplication(), this, markupStream, tag)) { - if (container instanceof IComponentResolver) - { - if (((IComponentResolver)container).resolve(this, markupStream, tag)) - { - return; - } - } - - container = container.findParent(MarkupContainer.class); - } - - // 3rd try: Try application's component resolvers - final List componentResolvers = getApplication().getPageSettings() - .getComponentResolvers(); - final Iterator iterator = componentResolvers.iterator(); - while (iterator.hasNext()) - { - final IComponentResolver resolver = iterator.next(); - if (resolver.resolve(this, markupStream, tag)) - { - return; - } + return; } if (tag instanceof WicketTag) Added: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java?rev=818380&view=auto == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java (added) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java Thu Sep 24 06:41:12 2009 @@ -0,0 +1,53 @@ +/* + * 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 "Licens
svn commit: r818379 - in /wicket/trunk/wicket/src/main/java/org/apache/wicket: ./ markup/html/internal/ markup/resolver/
Author: ivaynberg Date: Thu Sep 24 06:41:11 2009 New Revision: 818379 URL: http://svn.apache.org/viewvc?rev=818379&view=rev Log: WICKET-2485 IComponentResolvers are not supported inside wicket:enclosure Issue: WICKET-2485 Added: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java (with props) wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/DirectChildTagIterator.java (with props) wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/ResponseBufferZone.java (with props) wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/resolver/ComponentResolvers.java (with props) Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java?rev=818379&r1=818378&r2=818379&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java Thu Sep 24 06:41:11 2009 @@ -31,7 +31,7 @@ import org.apache.wicket.markup.MarkupNotFoundException; import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.WicketTag; -import org.apache.wicket.markup.resolver.IComponentResolver; +import org.apache.wicket.markup.resolver.ComponentResolvers; import org.apache.wicket.model.IComponentInheritedModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.IWrapModel; @@ -1520,33 +1520,9 @@ } else { - // 2rd try: Components like Border and Panel might implement - // the ComponentResolver interface as well. - MarkupContainer container = this; - while (container != null) + if (ComponentResolvers.resolve(getApplication(), this, markupStream, tag)) { - if (container instanceof IComponentResolver) - { - if (((IComponentResolver)container).resolve(this, markupStream, tag)) - { - return; - } - } - - container = container.findParent(MarkupContainer.class); - } - - // 3rd try: Try application's component resolvers - final List componentResolvers = getApplication().getPageSettings() - .getComponentResolvers(); - final Iterator iterator = componentResolvers.iterator(); - while (iterator.hasNext()) - { - final IComponentResolver resolver = iterator.next(); - if (resolver.resolve(this, markupStream, tag)) - { - return; - } + return; } if (tag instanceof WicketTag) Added: wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java?rev=818379&view=auto == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java (added) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/AutoMarkupLabel.java Thu Sep 24 06:41:11 2009 @@ -0,0 +1,53 @@ +/* + * 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 la
svn commit: r818979 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties
Author: ivaynberg Date: Fri Sep 25 20:06:13 2009 New Revision: 818979 URL: http://svn.apache.org/viewvc?rev=818979&view=rev Log: WICKET-2492 Issue: WICKET-2492 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties?rev=818979&r1=818978&r2=818979&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties Fri Sep 25 20:06:13 2009 @@ -40,3 +40,9 @@ null=Escolha nullValid= + +PagingNavigator.first=Voltar \u00E0 primeira p\u00E1gina +PagingNavigator.previous=Voltar \u00E0 p\u00E1gina anterior +PagingNavigator.next=Avan\u00E7ar \u00E0 pr\u00F3xima p\u00E1gina +PagingNavigator.last=Avan\u00E7ar \u00E0 \u00FAltima p\u00E1gina +PagingNavigation.page=Ir \u00E0 p\u00E1gina ${page} \ No newline at end of file
svn commit: r818980 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties
Author: ivaynberg Date: Fri Sep 25 20:06:42 2009 New Revision: 818980 URL: http://svn.apache.org/viewvc?rev=818980&view=rev Log: WICKET-2492 Issue: WICKET-2492 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties?rev=818980&r1=818979&r2=818980&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Application_pt_BR.properties Fri Sep 25 20:06:42 2009 @@ -40,3 +40,9 @@ null=Escolha nullValid= + +PagingNavigator.first=Voltar \u00E0 primeira p\u00E1gina +PagingNavigator.previous=Voltar \u00E0 p\u00E1gina anterior +PagingNavigator.next=Avan\u00E7ar \u00E0 pr\u00F3xima p\u00E1gina +PagingNavigator.last=Avan\u00E7ar \u00E0 \u00FAltima p\u00E1gina +PagingNavigation.page=Ir \u00E0 p\u00E1gina ${page} \ No newline at end of file
svn commit: r818988 - /wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java
Author: ivaynberg Date: Fri Sep 25 20:16:53 2009 New Revision: 818988 URL: http://svn.apache.org/viewvc?rev=818988&view=rev Log: WICKET-2445 clean up deprecations Modified: wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java Modified: wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java?rev=818988&r1=818987&r2=818988&view=diff == --- wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java (original) +++ wicket/branches/wicket-1.4.x/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java Fri Sep 25 20:16:53 2009 @@ -35,7 +35,6 @@ import org.apache.wicket.markup.html.form.Radio; import org.apache.wicket.markup.html.form.RadioChoice; import org.apache.wicket.markup.html.form.RadioGroup; -import org.apache.wicket.markup.html.form.RequiredTextField; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.list.ListItem; @@ -48,7 +47,7 @@ import org.apache.wicket.util.convert.ConversionException; import org.apache.wicket.util.convert.IConverter; import org.apache.wicket.util.convert.MaskConverter; -import org.apache.wicket.validation.validator.NumberValidator; +import org.apache.wicket.validation.validator.RangeValidator; /** @@ -88,19 +87,21 @@ } }); - RequiredTextField stringTextField = new RequiredTextField( - "stringProperty"); - stringTextField.setLabel(new Model("String")); - add(stringTextField); - RequiredTextField integerTextField = new RequiredTextField( - "integerProperty"); - add(integerTextField.add(NumberValidator.POSITIVE)); - add(new RequiredTextField("doubleProperty")); + add(new TextField("stringProperty").setRequired(true).setLabel( + new Model("String"))); + + add(new TextField("integerProperty", Integer.class).setRequired(true).add( + new RangeValidator(1, Integer.MAX_VALUE))); + + add(new TextField("doubleProperty", Double.class).setRequired(true)); + + add(new TextField("integerInRangeProperty").setRequired(true).add( + new RangeValidator(0, 100))); - add(new RequiredTextField("integerInRangeProperty").add(NumberValidator.range( - 0, 100))); add(new CheckBox("booleanProperty")); + add(new Multiply("multiply")); + // display the multiply result Label multiplyLabel = new Label("multiplyLabel", new PropertyModel( getDefaultModel(), "multiply"));
svn commit: r818989 - /wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java
Author: ivaynberg Date: Fri Sep 25 20:19:09 2009 New Revision: 818989 URL: http://svn.apache.org/viewvc?rev=818989&view=rev Log: WICKET-2445 clean up derecations Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java?rev=818989&r1=818988&r2=818989&view=diff == --- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java (original) +++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java Fri Sep 25 20:19:09 2009 @@ -35,7 +35,6 @@ import org.apache.wicket.markup.html.form.Radio; import org.apache.wicket.markup.html.form.RadioChoice; import org.apache.wicket.markup.html.form.RadioGroup; -import org.apache.wicket.markup.html.form.RequiredTextField; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.list.ListItem; @@ -48,7 +47,6 @@ import org.apache.wicket.util.convert.ConversionException; import org.apache.wicket.util.convert.IConverter; import org.apache.wicket.util.convert.MaskConverter; -import org.apache.wicket.validation.validator.MinimumValidator; import org.apache.wicket.validation.validator.RangeValidator; @@ -89,17 +87,17 @@ } }); - RequiredTextField stringTextField = new RequiredTextField( - "stringProperty"); - stringTextField.setLabel(new Model("String")); - add(stringTextField); - RequiredTextField integerTextField = new RequiredTextField( - "integerProperty"); - add(integerTextField.add(new MinimumValidator(0))); - add(new RequiredTextField("doubleProperty")); + add(new TextField("stringProperty").setRequired(true).setLabel( + new Model("String"))); + + add(new TextField("integerProperty", Integer.class).setRequired(true).add( + new RangeValidator(1, Integer.MAX_VALUE))); + + add(new TextField("doubleProperty", Double.class).setRequired(true)); + + add(new TextField("integerInRangeProperty").setRequired(true).add( + new RangeValidator(0, 100))); - add(new RequiredTextField("integerInRangeProperty").add(new RangeValidator( - 0, 100))); add(new CheckBox("booleanProperty")); add(new Multiply("multiply")); // display the multiply result
svn commit: r819150 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
Author: ivaynberg Date: Sat Sep 26 15:10:57 2009 New Revision: 819150 URL: http://svn.apache.org/viewvc?rev=819150&view=rev Log: WICKET-2489 cleanup Issue: WICKET-2489 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=819150&r1=819149&r2=819150&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Sat Sep 26 15:10:57 2009 @@ -19,6 +19,7 @@ import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; @@ -391,14 +392,13 @@ } /** -* Return true, if the Component has already been added +* Returns an unmodifiable collection of all components added to this target * -* @param component -* @return true, if already added +* @return unmodifiable collection of all components added to this target */ - public final boolean isAdded(final Component component) + public final Collection getComponents() { - return (null != markupIdToComponent.get(component.getMarkupId())); + return Collections.unmodifiableCollection(markupIdToComponent.values()); } /**
svn commit: r819149 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
Author: ivaynberg Date: Sat Sep 26 15:10:45 2009 New Revision: 819149 URL: http://svn.apache.org/viewvc?rev=819149&view=rev Log: WICKET-2489 cleanup Issue: WICKET-2489 Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=819149&r1=819148&r2=819149&view=diff == --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original) +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Sat Sep 26 15:10:45 2009 @@ -19,6 +19,7 @@ import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; @@ -387,14 +388,13 @@ } /** -* Return true, if the Component has already been added +* Returns an unmodifiable collection of all components added to this target * -* @param component -* @return true, if already added +* @return unmodifiable collection of all components added to this target */ - public final boolean isAdded(final Component component) + public final Collection getComponents() { - return (null != markupIdToComponent.get(component.getMarkupId())); + return Collections.unmodifiableCollection(markupIdToComponent.values()); } /**
svn commit: r819348 - /wicket/branches/wicket-1.4.x/CHANGELOG-1.4
Author: ivaynberg Date: Sun Sep 27 17:16:30 2009 New Revision: 819348 URL: http://svn.apache.org/viewvc?rev=819348&view=rev Log: catch up changelog Modified: wicket/branches/wicket-1.4.x/CHANGELOG-1.4 Modified: wicket/branches/wicket-1.4.x/CHANGELOG-1.4 URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/CHANGELOG-1.4?rev=819348&r1=819347&r2=819348&view=diff == --- wicket/branches/wicket-1.4.x/CHANGELOG-1.4 (original) +++ wicket/branches/wicket-1.4.x/CHANGELOG-1.4 Sun Sep 27 17:16:30 2009 @@ -1,5 +1,110 @@ This file contains all changes done on the 1.4 version. +Release Notes - Wicket - Version 1.4.1 + + +** Bug +* [WICKET-2316] - Form generates invalid html in appendDefaultButtonField +* [WICKET-2378] - FormTester should call detach +* [WICKET-2397] - text fields do not honor isrequired() +* [WICKET-2402] - SetRowsPerPage with AjaxFallbackDefaultDataTable +* [WICKET-2406] - Palette component breaks XHTML validation +* [WICKET-2407] - AbstractOptions of Palette may cause an HTML error with illegal chars +* [WICKET-2415] - Estonian translation for StringValidator.minimum contains ${mimimum} instead of ${minimum} +* [WICKET-2418] - NPE in ResourceReference +* [WICKET-2422] - DefaultDataTable hides NavigationToolbar once and forever +* [WICKET-2423] - Not all "domready" events are called when two wicket-event.js files are added to the page + +** Improvement +* [WICKET-2020] - Callback after detaching the page but before the PageMap lock is released +* [WICKET-2290] - upgrade pom reference for joda-time to 1.6 +* [WICKET-2374] - Model's factory methods are inconsistent +* [WICKET-2410] - AjaxRequestTarget could skip component when its ancestor is added too +* [WICKET-2413] - Better error handling when filterName attribute of WicketSessionFilter is misconfigured +* [WICKET-2417] - FilterToolbar, FilterForm conformity to XHTML strict + +** New Feature +* [WICKET-2412] - Add dev time check for empty src="" attribute that can cause problems +* [WICKET-2420] - Ajax support for multipart forms + + + +Release Notes - Wicket - Version 1.4.0 + + +** Bug +* [WICKET-2350] - Localization messages stops working with validators since 1.4-rc2 +* [WICKET-2363] - Two minor quick-to-fix quality bugs in WicketTester +* [WICKET-2366] - Refactor: org.apache.wicket.util.string.Strings#fromEscapedUnicode(String escapedUnicodeString) +* [WICKET-2367] - ApacheLicenceHeaderTest fails checking non-project file +* [WICKET-2368] - Page.checkRendering fails after setting BorderBodyContainer visiblity to false +* [WICKET-2381] - IModel parameters of StringResourceModel not getting detached +* [WICKET-2382] - Stateless problems +* [WICKET-2384] - OutOfMemoryError occur for memory leak on FeedbackPanel & FeedbackMessages +* [WICKET-2386] - JavaDoc: Some JavDoc examples still refer to WicketServlet +* [WICKET-2391] - Tag ''has a mismatched close tag at '' +* [WICKET-2392] - MarkupComponentBorder fails to close stream (?) +* [WICKET-2394] - KittenCaptcha example broken + +** Improvement +* [WICKET-2362] - Update hungarian localization + + +Release Notes - Wicket - Version 1.4-RC7 + + +** Bug +* [WICKET-2337] - IndexOutOfBoundsException when PropertyResolver is using an invalid list index +* [WICKET-2346] - Problem with displaying expired page. +* [WICKET-2354] - PropertyModel does not support index only property ("[0]") +* [WICKET-2358] - EmailAddressValidator property has a typo in French version + +** Improvement +* [WICKET-2351] - Make TimeFrame, Duration, Time and related classes Serializable. +* [WICKET-2360] - Checkbox: Make setters fluid + + +Release Notes - Wicket - Version 1.4-RC6 + + +** Bug +* [WICKET-1897] - StatelessForm submitted to the wrong page +* [WICKET-2127] - Javascript function Wicket.replaceAll is unbearably slow +* [WICKET-2202] - Form gets submitted using AjaxSubmitBehavior when sub-form has error's +* [WICKET-2268] - NullPointerException NPE in DiskPageStore after Session Timeout +* [WICKET-2284] - German translation for NumberValidator.minimum is wrong +* [WICKET-2294] - CryptedUrlWebRequestCodingStrategy fails while decoding parameters after the app has been up and running for quite some time. +* [WICKET-2325] - IChoiceRenderer generic type parameters are wrong throughout the AbstractChoice class hierarchy +* [WICKET-2330] - AjaxFormSubmitBehavior throws an NullPointerException when getForm() is overridden +* [WICKET-2333] - RatingPanel doesn't "wrap" models +* [WICKET-2334] - DebugBar throws an java.lang.ExceptionInInitializerError when Tomcat is restarted +* [WICKET-2335] - JavaDoc inconsistent to t
svn commit: r819354 - /wicket/branches/wicket-1.4.2/
Author: ivaynberg Date: Sun Sep 27 17:22:56 2009 New Revision: 819354 URL: http://svn.apache.org/viewvc?rev=819354&view=rev Log: 1.4.2 release branch Added: wicket/branches/wicket-1.4.2/ (props changed) - copied from r819353, wicket/branches/wicket-1.4.x/ Propchange: wicket/branches/wicket-1.4.2/ -- --- subclipse:tags (added) +++ subclipse:tags Sun Sep 27 17:22:56 2009 @@ -0,0 +1,5 @@ +550610,wicket-1.3.0-beta2,/wicket/tags/wicket-1.3.0-beta2,tag +567792,wicket-1.3.0-beta3,/wicket/tags/wicket-1.3.0-beta3,tag +582590,wicket-1.3.0-beta4,/wicket/tags/wicket-1.3.0-beta4,tag +591745,wicket-1.3.0-rc1,/wicket/tags/wicket-1.3.0-rc1,tag +601799,wicket-1.3.0-rc2,/wicket/tags/wicket-1.3.0-rc2,tag Propchange: wicket/branches/wicket-1.4.2/ -- --- svn:ignore (added) +++ svn:ignore Sun Sep 27 17:22:56 2009 @@ -0,0 +1,4 @@ +target +.metadata +.project +velocity.log Propchange: wicket/branches/wicket-1.4.2/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Sun Sep 27 17:22:56 2009 @@ -0,0 +1,2 @@ +/wicket/sandbox/jthomerson/experimental/wicket-devutils:760296-760351,760353-760355 +/wicket/trunk/wicket-devutils:760352