reiern70 commented on pull request #467:
URL: https://github.com/apache/wicket/pull/467#issuecomment-817105190


   > @svenmeier and @martin-g
   > 
   > Thanks for your comments:
   > 
   > > IMHO OnFileSelectedBehavior deserves to be a top-level class.
   > 
   > My rationale was the following: this class will only be used in relation 
with FileUploadField, why then pollute package? Of course, this is a matter of 
taste and consistency with project practices/conventions. Moving it top-level 
class.
   > 
   > > Maybe with its own JS resource, since the script to collect 
dynamicExtraParameters is getting very long now.
   > 
   > True.
   > 
   > > With a static factory method users could use a lambda expression (like 
we have for several other behaviors, e.g. AjaxFormSubmitBehavior#onSubmit):
   > > ```
   > > file.add(OnFileSelectedBehavior.onSelected((AjaxRequestTarget target, 
List<OnFileSelectedBehavior.FileDescription> fileDescriptions) -> {
   > >     // ...
   > > }));
   > > ```
   > > 
   > > 
   > > Maybe drop the "On"-prefix too, since almost all current behaviors don't 
have it - are you doing Android development? ;)
   > 
   > Never did Android development in my life. If you both agree this should be 
done I will gladly do it ;-)
   
   @svenmeier My latest commit introduces factory method as  what you suggested
   
   
![image](https://user-images.githubusercontent.com/462655/114264772-d6b3b380-99ba-11eb-9a70-fe2876bdb375.png)
   
   thanks for pointing this out.
   


-- 
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.

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


Reply via email to