[
https://issues.apache.org/jira/browse/MYFACES-2688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884793#action_12884793
]
Martin Kočí commented on MYFACES-2688:
--------------------------------------
h:inputFile is planned for JSF 2.1:
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=690. I
don't know exact plan for 2.1 but first milestone (without inputFile) is here:
http://wiki.jcp.org/wiki/index.php?page=JSF+2.1+Change+Log so it seems 2.1 is
on the way.
Problem with missing multipart support has many consequencies: this issue,
http://www.mail-archive.com/[email protected]/msg55998.html, JSF
HTML_BASIC does'nt cover all elements from HTML 4.01, user must use third party
uploads (which are incompatible) usw.
Solution from
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=690
based on decorated ExternalContext.getRequestParameterMap() (Neil's solution)
works without problem - I've adated it to servlet enviroment and it works:
without a servlet filter, without any third party library and doesn't lose
request parameters with multipart request even they comes from a conversation
framework.
I hope this could be in myfaces core now and it does not break compatibility -
if so I can provide a patch.
> when form is 'multipart/form-data', form component will never process update.
> -----------------------------------------------------------------------------
>
> Key: MYFACES-2688
> URL: https://issues.apache.org/jira/browse/MYFACES-2688
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0
> Environment: mac os x, tomcat.
> Reporter: Mark Li
> Original Estimate: 120h
> Remaining Estimate: 120h
>
> because 'javax.view.id' will not be find in request.getParametersMap, the
> restore phase executor will stop execute.
> source code:
> package org.apache.myfaces.lifecycle;
> .........
> class RestoreViewExecutor implements PhaseExecutor
> ..........
> public boolean execute(FacesContext facesContext){
> ..................
> if (!errorPageRequest &&
> restoreViewSupport.isPostback(facesContext)){
> ................
> }
> ...............
> }
> restoreViewSupport.isPostback(facesContext) will call
> facesContext.getExternalContext().getRequestParameterMap().get(ResponseStateManager.VIEW_STATE_PARAM)
> but request.parameterMap is empty because of using 'multipart/form-data'.
> restoreViewSupport.isPostback(facesContext) will return false,
> then FacesContext.renderResponse() is called. the whole phasing process is
> stopped.
> suggestion:
> should wrap request.parameterMap from the first place.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.