You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2011/01/26 18:36:44 UTC
[jira] Resolved: (WICKET-3371) Implementation of protected
handleMultipart method requires private method
[ https://issues.apache.org/jira/browse/WICKET-3371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-3371.
-----------------------------------
Resolution: Invalid
Assignee: Igor Vaynberg
public boolean isMultiPart() is already public
> Implementation of protected handleMultipart method requires private method
> --------------------------------------------------------------------------
>
> Key: WICKET-3371
> URL: https://issues.apache.org/jira/browse/WICKET-3371
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Willis Blackburn
> Assignee: Igor Vaynberg
>
> In Form is a method called handleMultipart, which is protected, presumably so that it can be overridden in subclasses. I want to override it in order to create a different multipart request wrapper--one that can handle multiple uploads from the same field. But the first line of the Form.handleMultipart method is:
> if (isMultipart()) ...
> and isMultipart is a private method, so my new implementation can't check to see if the form is actually in multipart mode.
> Could isMultipart just be public? After all setMultipart is. I see that the method examines the component tree, so it may not be appropriate to call isMultipart at any arbitrary time, but that's true with most other methods too. (If I set my component's visibility in onConfigure, for example, then calling isVisible before onConfigure during request processing might return the "wrong" visibility state.)
> Alternately the calling line could be changed from:
> if (handleMultipart()) ...
> to
> if (!isMultipart() || handleMultipart()) ...
> In other words, don't call handleMultipart if the form isn't mutlipart.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.