I have developed a jsf application with following facets
I have a page with an t:inputFileUpload component. it was working fine till i added ajax and rich faces components and taglibs to my page. As follows:-
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@taglib uri="http://richfaces.org/rich" prefix="rich"%>
...
<t:inputFileUpload...
All i want to ask is that, is it not possible that these taglibs can work together?
Thanks in advance.
It should work fine as long as you don't submit the form by ajax. It's namely not possible to upload files by ajax using the <t:inputFileUpload>
. So, you need to make sure that you submit the form by a synchronous (non-ajax) request.
You should also make sure that the Tomahawk's ExtensionsFilter
is been registered in web.xml
before RichFaces' org.ajax4jsf.Filter
, otherwise it will consume the multipart/form-data
request before Tomahawk's ExtensionsFilter
get chance to do so.
Alternatively, you could drop Tomahawk's <t:inputFileUpload>
and use RichFaces' own <rich:fileUpload>
instead. It's able to simulate a "ajax look-a-like" file upload using Flash.