1. #1
    Ext User
    Join Date
    Mar 2009
    Posts
    5
    Vote Rating
    0
    andre_guitar7 is on a distinguished road

      0  

    Default Events.Submit don´t work for FromPanel Encoding.MULTIPART and Method.POST

    Events.Submit don´t work for FromPanel Encoding.MULTIPART and Method.POST


    Olá!

    Quando um FormPanel possuí Encoding.MULTIPART e Method.POST, ele nunca entra no listener Events.Submit.

    PHP Code:
            formDeEdicao.setEncoding(Encoding.MULTIPART);
            
    formDeEdicao.setMethod(Method.POST);
            
    formDeEdicao.addListener(Events.Submit, new Listener<FormEvent>() 
                {
                    public 
    void handleEvent(FormEvent formEvent
                    {
                        
    //NÃO PASSA POR AQUI
                    
    }
                }); 
    Isso é um BUG?

  2. #2
    Ext User
    Join Date
    Aug 2009
    Posts
    4
    Vote Rating
    0
    calhau is on a distinguished road

      0  

    Default


    I have same problem...

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Many people use this without any problems. Dont forget about the same origin policy within the browsers. Moving this to the help forum.

  4. #4
    Ext Premium Member
    Join Date
    Aug 2009
    Posts
    29
    Vote Rating
    0
    lucasdeoliveira is on a distinguished road

      0  

    Exclamation well, me too (sorry sven!)

    well, me too (sorry sven!)


    Same problem here: I have a class that extends FormPanel (intented to upload files to a servlet) and I have the following client code:

    Code:
    //...
            this.setMethod(Method.POST);
            this.setEncoding(Encoding.MULTIPART);
            this.setAction(fileUploadAction);
            
            this.addListener(Events.Submit, new Listener<FormEvent>() {
                public void handleEvent(FormEvent arg0) {
                    MessageBox.alert("Result", "Check Forums on how to get an actual result: "
                            + arg0.getResultHtml(), null);
                    atualizarPesquisa();
                }
            });
    //...
    here goes the server side code:
    Code:
           FileItem uploadItem = getFileItem(request); //ommited, it works anyway       
            byte[] fileContents = uploadItem.get();
            
            
            // persist file on db... (ommited)
    
            response.setStatus(HttpServletResponse.SC_CREATED);
            response.setContentType("text/plain");
            response.getWriter().print("id do arquivo = " + Arquivo.numeroArquivos);
            response.flushBuffer();
    I've tried both hosted andserver mode but unfortunately when I attempt to this.submit() nothing happens. As a test I tried the Events.BeforeSubmit and it worked fine. Not sure what I'm missing...

    any help will be apreciated.

    thanks in advance!

  5. #5
    Ext User
    Join Date
    May 2009
    Posts
    5
    Vote Rating
    0
    coebs is on a distinguished road

      0  

    Default Yes, I am treating with the same problem

    Yes, I am treating with the same problem


    I have the same problem as described above.

    My goal is to submit a form to a server-side cgi and get the response.

    But the Events.Submit is never fired in my Listener.

    A summary of my code:

    FormPanel panel = new FormPanel();
    panel.setMethod(FormPanel.Method.POST);
    panel.setEncoding(FormPanel.Encoding.URLENCODED);
    panel.setAction(url);
    panel.addListener(Events.Submit, new Listener<BaseEvent>() {
    public void handleEvent(BaseEvent be) {
    System.out.println("Hello World");
    }
    });

    Any response from EXT JS? Thanks in advance ...

  6. #6
    Ext Premium Member
    Join Date
    Aug 2009
    Posts
    29
    Vote Rating
    0
    lucasdeoliveira is on a distinguished road

      0  

    Default


    I believe it worked on versions prior than 2.x =/, but the projects I'm working on demand the use of some nice stuff presented on 2.x. So I've got no way out. Do you guys have any other idea to bypass this problem?

    cheers!

  7. #7
    Ext User
    Join Date
    Feb 2009
    Posts
    11
    Vote Rating
    0
    Henrique Miranda is on a distinguished road

      0  

    Exclamation Same problem

    Same problem


    I was using GWT 1.6 with GXT 2.0 my app was working, but when i changed for GWT 1.7 and GXT 2.0.1 form event don't work more.

  8. #8
    Ext User
    Join Date
    May 2009
    Posts
    5
    Vote Rating
    0
    coebs is on a distinguished road

      0  

    Default


    Okay, here is an update of my case.

    IN MY CASE, Events.Submit doesn't be fired under the GWT hosted mode (in eclipse), but after it to be compiled, I can get the expected result(i.e. Events.Submit is fired after formPanel.submit() being called) by using FireFox browser, though still not by using IE 8.0.6.

  9. #9
    Ext Premium Member
    Join Date
    Aug 2009
    Posts
    29
    Vote Rating
    0
    lucasdeoliveira is on a distinguished road

      0  

    Default


    Howdy!
    Quote Originally Posted by Henrique Miranda View Post
    I was using GWT 1.6 with GXT 2.0 my app was working, but when i changed for GWT 1.7 and GXT 2.0.1 form event don't work more.
    can you share the piece of your code that does the event.submit treatment with us?

    thanks a lot guys! let's make this thing work =D

    cheers!

  10. #10
    Ext User
    Join Date
    Feb 2009
    Posts
    11
    Vote Rating
    0
    Henrique Miranda is on a distinguished road

      0  

    Default


    Code:
    formPanel = new FormPanel();
    formPanel.setAction(GWT.getModuleBaseURL()+"/Pc.pcUpload");
    formPanel.setEncoding(FormPanel.Encoding.MULTIPART);
    formPanel.setMethod(FormPanel.Method.POST);
    formPanel.setBorders(false);  
    formPanel.setBodyBorder(false);  
    formPanel.setLabelWidth(80);  
    formPanel.setPadding(5);  
    formPanel.setHeaderVisible(false);
    formPanel.setLayout(new ColumnLayout());
    formPanel.addListener(Events.Submit, new Listener<FormEvent>(){
        public void handleEvent(FormEvent be) {
            eventoFormSubmit(be);
        }
    });

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar