adv. fileUpload - how to pass additional parameters to bean?

UI Components for JSF
Post Reply
djmj
Posts: 400
Joined: 16 Dec 2011, 01:23

08 Feb 2012, 22:44

1
How do I pass additional parameters to my bean using advanced fileupload component (ajax).

The destination file name depends on an object's property. So I want to pass that Object to my bean too.

FileUpload does not support "setPropertyActionListener" or others.

Without it I need a workaround.

2
Can it be that a single message field with for attribute is not working for fileUpload?
Primefaces: 11.0.0 RC2
Primefaces-Extension: 11.0.0
PrimeFaces-Mobile: 11.0
OmniFaces: 3.11
Jsf: Mojarra 2.3.8
Server: Glassfish 5.1.0

goodfield
Posts: 1
Joined: 17 Nov 2011, 12:34

15 Feb 2012, 01:26

Hi

have the same problem :-(

Did you find any solution ? i tried to trigger an p:remoteCommand onstart of the fileUpload but this works either.

David

evefuji
Posts: 25
Joined: 29 Aug 2011, 15:59

02 May 2012, 19:45

You find a solution?

I've same problem... In fileUpload I try to use onstart with p:remoteCommand but onstart is not triggered...

evefuji
Posts: 25
Joined: 29 Aug 2011, 15:59

02 May 2012, 19:45

I'm using Primefaces 3.2

evefuji
Posts: 25
Joined: 29 Aug 2011, 15:59

02 May 2012, 19:56

solved (bad solution):

i'm used:

<p:remoteCommand name="command"/>
<div onclick="command()"><p:fileUpload ..... /></div>

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

02 May 2012, 20:04

Hi,

You can try this technique http://stackoverflow.com/questions/6567 ... tocomplete It's about AutoComplete, but should work with FileUpload too.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests