svn commit: r819387 - in /wicket/trunk/wicket/src: main/java/org/apache/wicket/ main/java/org/apache/wicket/markup/ main/java/org/apache/wicket/markup/html/internal/ main/java/org/apache/wicket/markup

2009-09-27 Thread jdonnerstag
Author: jdonnerstag
Date: Sun Sep 27 19:21:11 2009
New Revision: 819387

URL: http://svn.apache.org/viewvc?rev=819387&view=rev
Log:
MarkupFragment: added test cases and fixed some bugs

Added:

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/MarkupTagIterator.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MarkupFragmentTest.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyBorder.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyBorder.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyBorder2.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyBorder2.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyBorder2_ExpectedResult.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyBorderPage.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyBorderPage.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyBorder_ExpectedResult.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyPage.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyPage.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyPage_ExpectedResult.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyPanel.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyPanel.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyPanelPage.html

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyPanelPage.java

wicket/trunk/wicket/src/test/java/org/apache/wicket/markupFragments/MyPanel_ExpectedResult.html
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/MarkupContainer.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/IMarkupFragment.java
wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/Markup.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/MarkupFragment.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/DirectChildTagIterator.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/Fragment.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/panel/Panel.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/resolver/ComponentResolvers.java

wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/resolver/WicketMessageResolver.java
wicket/trunk/wicket/src/test/java/org/apache/wicket/PageParametersTest.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=819387&r1=819386&r2=819387&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 
Sun Sep 27 19:21:11 2009
@@ -151,6 +151,45 @@
}
 
/**
+* Find a child component. It may have been directly added to the 
container or to a transparent
+* child container. From a user's point of view, it was added to this 
container.
+* 
+* @param child
+* @return The container the child was actually added to. Null if not 
found.
+*/
+   private MarkupContainer findChild(final Component child)
+   {
+   if (get(child.getId()) != null)
+   {
+   return this;
+   }
+
+   MarkupContainer container = 
(MarkupContainer)visitChildren(MarkupContainer.class,
+   new IVisitor()
+   {
+   public Object component(MarkupContainer 
container)
+   {
+   if (container.isTransparentResolver())
+   {
+   if 
(container.getId().equals(child.getId()))
+   {
+   return container;
+   }
+   return 
IVisitor.CONTINUE_TRAVERSAL;
+   }
+   return 
IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
+  

[jira] Commented: (WICKET-2395) add MixedParamHybridUrlCodingStrategy

2009-09-27 Thread Erik van Oosten (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-2395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760086#action_12760086
 ] 

Erik van Oosten commented on WICKET-2395:
-

Igor committed WICKET-2439 earlier. WICKET-2439 also contains this class.

> add MixedParamHybridUrlCodingStrategy
> -
>
> Key: WICKET-2395
> URL: https://issues.apache.org/jira/browse/WICKET-2395
> Project: Wicket
>  Issue Type: New Feature
>Affects Versions: 1.4-RC5
>Reporter: Vladimir Kovalyuk
>Assignee: Juergen Donnerstag
> Fix For: 1.4.2
>
>
> /**
>  * Apache 2 license.
>  */
> import java.util.HashSet;
> import java.util.Iterator;
> import java.util.Map;
> import java.util.Set;
> import org.apache.wicket.Page;
> import org.apache.wicket.PageParameters;
> import org.apache.wicket.RequestCycle;
> import org.apache.wicket.request.target.coding.HybridUrlCodingStrategy;
> import org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy;
> import org.apache.wicket.util.string.AppendingStringBuffer;
> import org.apache.wicket.util.value.ValueMap;
> import org.slf4j.Logger;
> import org.slf4j.LoggerFactory;
> /**
>  * @see MixedParamUrlCodingStrategy
>  * 
>  * @author Erik van Oosten
>  */
> 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
>*?
>* @param parameterNames
>*the parameter names (not null)
>*/
>   public MixedParamHybridUrlCodingStrategy(String mountPath, Class extends Page> 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 MixedParamHybridUrlCodingStrategy(String mountPath, Class extends Page> pageClass, String[] parameterNames) {
>   super(mountPath, pageClass);
>   this.parameterNames = parameterNames;
>   }
>   /** {...@inheritdoc} */
>   @Override
>   protected void appendParameters(AppendingStringBuffer url, Map ?> parameters) {
>   if (!url.endsWith("/")) {
>   url.append("/");
>   }
>   Set parameterNamesToAdd = new 
> HashSet(parameters.keySet());
>   // Find index of last specified parameter
>   boolean foundParameter = false;
>   int lastSpecifiedParameter = parameterNames.length;
>   while (lastSpecifiedParameter != 0 && !foundParameter) {
>   foundParameter = 
> parameters.containsKey(parameterNames[--lastSpecifiedParameter]);
>   }
>   if (foundParameter) {
>   for (int i = 0; i <= lastSpecifiedParameter; i++) {
>   String parameterName = parameterNames[i];
>   final Object param = 
> parameters.get(parameterName);
>   String value = param instanceof String[] ? 
> ((String[]) param)[0] : (String) param;
>   if (value == null) {
>   value = "";
>   }
>   
> url.append(urlEncodePathComponent(value)).append("/");
>   parameterNamesToAdd.remove(parameterName);
>   }
>   }
>   if (!parameterNamesToAdd.isEmpty()) {
>   boolean first = true;
>   final Iterator iterator = 
> parameterNamesToAdd.iterator();
>   while (iterator.hasNext()) {
>   url.append(first ? '?' : '&');
>   String parameterName = (String) iterator.next();
>   final Object param = 
> parameters.get(parameterName);
>   String value = param instanceof String[] ? 
> ((String[]) param)[0] : (String) param;
>   
> url.append(urlEncodeQueryComponent(parameterName))

svn commit: r819357 - in /wicket/branches/wicket-1.4.2: ./ archetypes/quickstart/ archetypes/quickstart/src/main/resources/archetype-resources/ testing/wicket-threadtest/ wicket-auth-roles/ wicket-dat

2009-09-27 Thread ivaynberg
Author: ivaynberg
Date: Sun Sep 27 17:25:57 2009
New Revision: 819357

URL: http://svn.apache.org/viewvc?rev=819357&view=rev
Log:
changelog and version numbers

Modified:
wicket/branches/wicket-1.4.2/CHANGELOG-1.4
wicket/branches/wicket-1.4.2/archetypes/quickstart/pom.xml

wicket/branches/wicket-1.4.2/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
wicket/branches/wicket-1.4.2/pom.xml
wicket/branches/wicket-1.4.2/testing/wicket-threadtest/pom.xml
wicket/branches/wicket-1.4.2/wicket-auth-roles/pom.xml
wicket/branches/wicket-1.4.2/wicket-datetime/pom.xml
wicket/branches/wicket-1.4.2/wicket-devutils/pom.xml
wicket/branches/wicket-1.4.2/wicket-examples/pom.xml
wicket/branches/wicket-1.4.2/wicket-extensions/pom.xml
wicket/branches/wicket-1.4.2/wicket-guice/pom.xml
wicket/branches/wicket-1.4.2/wicket-ioc/pom.xml
wicket/branches/wicket-1.4.2/wicket-jmx/pom.xml
wicket/branches/wicket-1.4.2/wicket-objectssizeof-agent/pom.xml
wicket/branches/wicket-1.4.2/wicket-quickstart/pom.xml
wicket/branches/wicket-1.4.2/wicket-spring/pom.xml
wicket/branches/wicket-1.4.2/wicket-velocity/pom.xml
wicket/branches/wicket-1.4.2/wicket/pom.xml

Modified: wicket/branches/wicket-1.4.2/CHANGELOG-1.4
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.2/CHANGELOG-1.4?rev=819357&r1=819356&r2=819357&view=diff
==
--- wicket/branches/wicket-1.4.2/CHANGELOG-1.4 (original)
+++ wicket/branches/wicket-1.4.2/CHANGELOG-1.4 Sun Sep 27 17:25:57 2009
@@ -1,5 +1,49 @@
 This file contains all changes done on the 1.4 version.
 
+Release Notes - Wicket - Version 1.4.2
+
+** Bug
+* [WICKET-2393] - Passwords should not be trimmed
+* [WICKET-2430] - Malformed \u encoding in 
MultipleUploadField_sl.properties
+* [WICKET-2433] - Ajax support for multipart forms broken in a nested form
+* [WICKET-2434] - RequestCycle urlFor ignores existing parameters when 
appending provided params
+* [WICKET-2436] - invalid DataTable markup breaks table layout
+* [WICKET-2438] - AjaxEventBehavior not working on feedback message 
components
+* [WICKET-2453] - Form.findForm(Component c) bug. When form is part of 
Border and form component like TextField is inside another Border , component 
cannot resolve its form.
+* [WICKET-2456] - DateTextField cannot work with default converter (or 
javadoc wrong)
+* [WICKET-2457] - Flash/ExternalInterface does not work in IE if movie is 
fetched via Wicket/Ajax
+* [WICKET-2458] - JavascriptUtils.escapeQuotes() misses escaping double 
quotes
+* [WICKET-2461] - AjaxPagingNavigationIncrementLink does not work without 
AjaxPagingNavigator component
+* [WICKET-2463] - Ajax miltipart form submitting ignores 
setDefaultFormProcessing(false)
+* [WICKET-2466] - javadoc the CryptedUrlWebRequestCodingStrategy needs to 
be update/corrected to reflect the usage of session-id for encryption and hence 
URLs which were bookmarkable before will NOT remain bookmarkable. 
+* [WICKET-2475] - NPE after application hot redeployment
+* [WICKET-2477] - AjaxEditableChoiceLabel does not detach choices model
+* [WICKET-2478] - TabbedPanel rendering bug
+* [WICKET-2485] - IComponentResolvers are not supported inside 
wicket:enclosure
+* [WICKET-2488] - QuickFix proposal WicketTesterHelper.assertEquals(final 
Collection expects, final Collection actuals) should compare list sizes
+
+** Improvement
+* [WICKET-626] - profile Wicket for 1.4.0
+* [WICKET-2435] - TabbedPanel extract factory method for tabs-container
+* [WICKET-2439] - Improve MixedParamUrlCodingStrategy, introduce Hybrid
+* [WICKET-2444] - Internal Spring beans should be ignored
+* [WICKET-2445] - FormInput.java needs the validators updated. 
+* [WICKET-2449] - Fix javadoc biggest mistakes - mainly @Deprecated tags
+* [WICKET-2451] - Add ability to load UTF-8 encoded properties not in XML 
format.
+* [WICKET-2454] - IE8: be more verbose if ajax refresh fails
+* [WICKET-2469] - Allow using a different FileItemFactory by extracting a 
method in MultipartServletWebRequest class
+* [WICKET-2492] - Application_pt_BR.properties path
+
+** New Feature
+* [WICKET-2395] - add MixedParamHybridUrlCodingStrategy
+* [WICKET-2483] - Access to WizardModel.conditions
+
+** Wish
+* [WICKET-2120] - widen visibiliy of GuiceProxyTargetLocator  and  
findBindingAnnotation  
+* [WICKET-2462] - Would it possible add chinese resource label for 
WizardButton eg. CancelButton, NextButton and PreviousButton etc.
+* [WICKET-2489] - need to know if a component has been added to the 
AjaxRequestTarget
+
+
 Release Notes - Wicket - Version 1.4.1
 
 

Modified: wicket/branches/wicket-1.4.2/archetypes/quickstart/pom.xml
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.2/archetypes/quickstart/pom.xml?rev=819357&r1=819

svn commit: r819354 - /wicket/branches/wicket-1.4.2/

2009-09-27 Thread ivaynberg
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




svn commit: r819348 - /wicket/branches/wicket-1.4.x/CHANGELOG-1.4

2009-09-27 Thread ivaynberg
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 the code
+* [WICKET-2336] - JavaDoc, point out the need of a super call.
+* [WICKET-2341] - AbstractSin