martin-g commented on code in PR #561:
URL: https://github.com/apache/wicket/pull/561#discussion_r1145771449


##########
wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java:
##########
@@ -1866,6 +1904,29 @@ protected void onBeforeRender()
                // clear multipart hint, it will be reevaluated by 
#isMultiPart()
                this.multiPart &= MULTIPART_HARD;
 
+               if (!fileCountMax.isPresent())
+               {
+                       AtomicLong accumulator = new AtomicLong(0);
+                       visitChildren(MultiFileUploadField.class, new 
IVisitor<MultiFileUploadField, Void>()

Review Comment:
   Another option is to visit the FileUploadFields first and if it does not 
have `multiple` attribute then count it as `1`. It it has `multiple` then stop 
and do nothing more.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to