igor.vaynberg wrote:
> 
> so what form error do you see displayed?
> 
> -igor
> 
I see no error message. Within my form I have three submit buttons (I set
out relevant code fragments below). Clicking any of these buttons does not
result in their overridden onSubmit() methods being called (for the form's
overridden onSubmit() method either). Something happens on the browser
(Mozilla Firefox) since the waiting dots appear for a brief moment, but no
change is apparent to me on the browser.

I guess that something might be failing silently in my FileUploadField
component instance, but I do not know how to proceed.

Ian


HTML code
----------

      <form wicket:id="frmForm">
                <input wicket:id="fufUploadImage" type="file" size="40"
tabindex="3"/>

                <input type="submit" wicket:id="btnUpload" value="<--- 
Upload file" tabindex="4"/>

                <input type="submit" wicket:id="btnOK" value="OK"
tabindex="101"/>

                <wicket:enclosure child="btnCancel">
                  <input type="submit" wicket:id="btnCancel" value="Cancel"
tabindex="102"/>
                </wicket:enclosure>
      </form>


Java code
----------
public final class PageItem extends PageBase    \\ PageBase descends from
WebPage
{
  private static final long serialVersionUID = 1L;

    Form frmForm = new Form("frmForm")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onSubmit()
      {
        ...

        //
        // Persist the item data here...
        //
      }
    };
    frmForm.setMultiPart(true);    // To enable file uploading
    frmForm.setMaxSize(G_BY_MAX_SIZE_FILE_UPLOAD);
    frmForm.setModel(new CompoundPropertyModel(g_pidData));
    add(frmForm);

    final FileUploadField fufUploadImage =
     new FileUploadField("fufUploadImage");
    frmForm.add(fufUploadImage);

    Button btnUpload = new Button("btnUpload")
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onSubmit()
      {
         ...
      }
    };
    btnUpload.setDefaultFormProcessing(false);
    frmForm.add(btnUpload);

    Button btnOK = new Button("btnOK");
    frmForm.add(btnOK);

    Button btnCancel = new Button("btnCancel")
    {
      private static final long serialVersionUID = 1L;
      @Override
      public void onSubmit()
      {
        ...
        setResponsePage(PageHome.class);
      }
    };
    btnCancel.setDefaultFormProcessing(false);
    frmForm.add(btnCancel);
}

-- 
View this message in context: 
http://www.nabble.com/FileUploadField-blocks-component-submission-when-an-empty-file-is-selected-tp25855504p25858766.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to