problem with p:fileupload inside p:dialog

UI Components for JSF
kency
Posts: 65
Joined: 27 Sep 2010, 08:06

08 Oct 2010, 18:38

I have problem with p:fileupload inside p:dialog
all of them ok but when i select single img and open , it display 2 process upload for one image , such as below:

Image


and how can i display thumbnail of this image i was uploaded in form inside p:dialog?

kency
Posts: 65
Joined: 27 Sep 2010, 08:06

09 Oct 2010, 08:42

Doesn't solve this problem?

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

09 Oct 2010, 10:50

Please create an issue ticket.


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

09 Oct 2010, 11:57

Thx!

kency
Posts: 65
Joined: 27 Sep 2010, 08:06

09 Oct 2010, 13:17

i wait for prime team fix it and P:editor inside p:dialog :D
maybe p:dialog have many problem :D

kency
Posts: 65
Joined: 27 Sep 2010, 08:06

10 Oct 2010, 08:19

Hello prime team sorry for new post but i was find out new bug with dialog, it mean my question above you can see two process on and have double p:editor inside p:dialog here http://primefaces.prime.com.tr/forum/vi ... ide+dialog
it occur in new form it mean when you create dialog e.g add , it no data on form inside dialog, it will occur twice or double component inside dialog.
in my practice, when i create dialog with new form for add person, it render twice editor or fileUpload, but in dialog edit Person it render one editor or fileUpload, it mean details for one person it have one and no data it have twice or double render.
Please check this bug thank you

zkropotkine
Posts: 24
Joined: 10 Jul 2010, 17:42

19 Oct 2010, 01:07

Hey,

I was having a hard time with the fileUpload inside a Dialog, but after some research I found that the problem wasn't the dialog itself.
Apparently the problem was to put the fileUpload inside a panelGroup/panelGrid component, after delete the panelGroup/Grid it works:

Here's my code:

Code: Select all

           <p:dialog modal="true" widgetVar="dlg">
                <h:form>
                 ...
                 ...
                        <p:fileUpload auto="true" fileUploadListener="#{PagoProveedor.handleFileConstanciaActividades}"
                                      allowTypes="*.jpg;*.pdf;*.png" label="Archivo de Autorización de la Comisión" update="@this"/>
                 ...
                 ...
                </h:form>
            </p:dialog>
  • Glassfish 2.1.1
  • Mojara 2.0.3
  • PF 2.2M1
  • JSF 2.0
  • Firefox 3.6.10
  • Ubuntu 10
  • Netbeans 6.8

kency
Posts: 65
Joined: 27 Sep 2010, 08:06

19 Oct 2010, 12:06

Hi Catagay i was solved this problem with reRender form , which inside dialog , contain editor,

if you have command button display dialog such as

Code: Select all

<p:commandButton update="dialogForm" value="OpenDialog" onclick="Dialog.show()"/>

and your dialog

Code: Select all

<dialog header="Dialog" widthVar="Dialog">
    <h:form id=dialogForm>
       <p:editor value=""/>
    </h:form>
</dialog>

it will reRender form and display one editor, it solved for fileUpload too.

kency
Posts: 65
Joined: 27 Sep 2010, 08:06

19 Oct 2010, 16:07

in showcause http://www.primefaces.org/showcase/ui/editor.jsf
have toolbar but i can not get toolbar attribute, it throw exception attribute not define !
and how i can make skin look like showcase?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 45 guests