fileupload & chrome: no "browse" button

UI Components for JSF
Post Reply
rsitze
Posts: 15
Joined: 13 Apr 2010, 07:06

13 Apr 2010, 07:12

Using <p:fileUpload fileUploadListener="#{myController.handleFileUpload}" />

I see the browse button just fine from IE, but not from Chrome.
Upload works (from IE), just no way to use it with the Chrome browser!

I've tried the 2.0.0, and the 4/12 2.0.1-SNAPSHOT.
Any suggestions welcome.

Thanks! Nice to have a JSF 2.0 open source library.. your work is appreciated.

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

13 Apr 2010, 14:31

Hi,

Can you see the fileupload button at online showcase with your chrome?

http://www.primefaces.org:8080/prime-sh ... Single.jsf

rsitze
Posts: 15
Joined: 13 Apr 2010, 07:06

13 Apr 2010, 19:04

Interestingly enough, I can.
So, I must be missing something in the enclosing context or ?
<ras>

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

13 Apr 2010, 20:49

Can you try enforcing content type;

Code: Select all

<f:view contentType="text/html">
//Page
</f:view>

rsitze
Posts: 15
Joined: 13 Apr 2010, 07:06

14 Apr 2010, 10:00

that was the first thing I tried... no change.
When I pull up the page source, I can *see* the <input ..> in the HTML.. it's simply has no visible presence. So that leads me to think it's a style issue, which kinda suggests resources? I'm also using p:datatable (same page), and that looks reasonably ok... so it's not so fundamental.

Another post suggested:
<h:body class="yui-skin-sam">

I'll try that tomorrow when I get back to the office.
<ras>

rsitze
Posts: 15
Joined: 13 Apr 2010, 07:06

14 Apr 2010, 22:12

So adding class to body (<h:body class="yui-skin-sam">) didn't help at all.
Looking more closely at page souce, I see the following:

<input type="file" id="form_j_idt20_file" name="form_j_idt20_file" style="display: none;" />

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

18 Apr 2010, 23:59

If you can see the button in online showcase but not locally, that is strange. Try comparing the showcase source and yours.

rsitze
Posts: 15
Joined: 13 Apr 2010, 07:06

13 May 2010, 20:57

Some more info...
behavior differs between Google Chrome on Windows XP, versus same on Windows 7.

More specifically, I can see everything just fine from Google Chrome on Windows 7, for both my webapp and your showcase.
The 'download' button is invisible from Chrome on Windows XP, for both my webapp and your showcase.

I recently upgraded to Primefaces 2.0.1 - same behavior.

rsitze
Posts: 15
Joined: 13 Apr 2010, 07:06

13 May 2010, 21:42

Good news: Installing the 'flash' plugin for Google Chrome resolved my problem "on XP".

Would have been nice for some suggestion/indication that there was an issue, instead of a non-functional and silent fall-back.

Still, my thanks for your wonderful solution.

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

13 May 2010, 21:46

It is the first time we encountered a case like this, glad it works now.

Fileupload will be enhanced soon to display a regular file input text if flash is disabled.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests