PF 3.0M1 FileUpload problem in IE

UI Components for JSF
Post Reply
jtrotman
Posts: 49
Joined: 29 Nov 2010, 14:32
Location: United Kingdom

28 Apr 2011, 11:50

Hi

I've been using Primefaces 3.0M1 for a while now and am very happy with the changes made since 2.2.1, especially the rejigged tree and fileUpload components, which were both in dire need of an overhaul. I am however having a problem with the fileUpload component in IE only. Essentially the fileUpload component is contained within the following facelet:

Code: Select all

    <ui:composition>
        <h:form id="uploadForm" enctype="multipart/form-data" prependId="false">
            <p:panel header="Upload Price List"
                     visible="#{panelManagerBean.renderSupplierFunctionality}">
                <p:fileUpload id="productFileUpload" fileUploadListener="#{fileUploadBean.handleProductFileUpload}"
                              mode="advanced" update="browserForm, propertiesForm, growl"/>
            </p:panel>
        </h:form>
    </ui:composition>
The upload completes properly in all browsers, and updates another form on the page which contains a datatable and some buttons. However on IE only (version 8), the whole application then becomes unresponsive, and attempting to interact with any components on the page results in a ViewExpiredException - almost as if all the beans that were backing the application have suddenly gone out of scope.

All updated components/forms on the page are also followed by the following text:
~com.sun.faces.saveStateFieldMarker~

The only way to restore functionality is to refresh the whole page, which presumably then recreates all the beans. This isn't a huge issue, I can use simple mode - even though it's ugly it seems to work without a hitch in IE8.

Still, any thoughts as to what is going on here would be appreciated, and at the very least I think the Primefaces team should know about this issue, if they don't already.

Thanks

Matrium
Posts: 112
Joined: 16 May 2011, 08:27

16 May 2011, 08:31

Hi!

Did you find any solution for this issue? I have exactly the same problem, 3.0M1 fileupload works perfectly with firefox and the file is still uploaded in ie (8), but after that the application becomes completely unresponsive
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 May 2011, 08:44

Does the showcase sample work for you guys?

http://www.primefaces.org/showcase-labs ... adHome.jsf

Matrium
Posts: 112
Joined: 16 May 2011, 08:27

16 May 2011, 10:04

Yes, as long as i dont use another component in the form the showcase works fine for me.

In the following example i just tried to add a button to showcase. In Firefox everthing works fine, but in IE8, after i first uploaded a file the commandbutton doesn't respond anymore (but the upload component does and the uploadlistener is still invoked)

Code: Select all

	<h:form enctype="multipart/form-data">
		<p:growl id="messages" showDetail="true" />
		<p:fileUpload
			fileUploadListener="#{fileUploadController.handleFileUpload}"
			mode="advanced" update="messages" sizeLimit="1000000" />
		<p:commandButton action="#{dataReport.refreshMenu()}" process="@this"
			image="ui-icon ui-icon-refresh" />
	</h:form>

My next question might be little stupid as i still have a lot to learn. I tried to use the upload component as part of a really large form which uses primefaces-wizard (which is great btw.). From my understanding in order to use the upload i have to change the form type to multipart/form-data, right? Is this really a good idea for this large form or should i try to find another place (outside the wizard) for the upload component so i can put it in a seperate form?
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!

rodakr
Posts: 36
Joined: 17 Mar 2011, 00:50
Location: switzerland

16 May 2011, 14:39

I had similar problem with IE7... here my work arround:
http://primefaces.prime.com.tr/forum/vi ... 940#p34923
OSX 10.6.x , Fedora 14, XBuntu 10.x , majora 2.x, primefaces 3.0-snapshot, Tomcat 7.x , weblogic server 11.x, jboss 7.x , glassfish 3.x

Matrium
Posts: 112
Joined: 16 May 2011, 08:27

17 May 2011, 06:53

Your work arround did the job for me, thanks for the quick answers both of you!

Still i am not sure if it is a good idea to set the whole form (which is big) to enctype="multipart/form-data". Will this have a negative effect on the performance? After reading through selfhtml and w3c documentation i am still unsure.. any hints for me?
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!

Matrium
Posts: 112
Joined: 16 May 2011, 08:27

17 May 2011, 09:25

*add:

the workaround works great for the above example, but when using fileupload inside wizard the reload will bring you back to the first wizard page, which is logical, but not intended by me
PrimeFaces (Elite) 4.0.13, Majorra 2.1.28, Tomcat 7.0.53
Testing with Firefox, Chrome and IE9+IE10
<3 Primefaces!!!

savio
Posts: 1
Joined: 26 Jun 2011, 03:46

26 Jun 2011, 03:54

any solution?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests