igor.vaynberg wrote:
> 
> do you have a feedback panel in your page, so you can see errors if they
> happen?
> 
> -igor
> 
Yes, I have a feedback panel in my (base) page as set out in code below. I
see nothing at all upon clicking. (I have set testing messages to appear in
my feedback panel holding data about the uploaded files, so I know that my
feedback panel works - and messages are shown for non-empty uploaded files!)

Ian


HTML code
-----------
    <div wicket:id="fbpnlFeedbackPanel"/>


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

  ...

  public PageBase()
  {
    this(null);
  }

  private PageBase(IModel model)
  {
    super(model);

    ...

    FeedbackPanel fbpnlFeedbackPanel = new
FeedbackPanel("fbpnlFeedbackPanel");
    add(fbpnlFeedbackPanel);
  }
}


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

      @Override
      public void onSubmit()
      {    // Test code follows
        FileUpload fuUpload = fufUploadImage.getFileUpload();
        CloudSession ssnSession = (CloudSession)getSession();

        String sMsg = "From btnUpload.onSubmit():
fufUploadImage.getFileUpload()";
        if (fuUpload == null)
          sMsg += " is null.";
        else
        {
          sMsg += String.format(" has size = %d, client file name = \"%s\","
           + " and content type = \"%s\".",
           fuUpload.getSize(), fuUpload.getClientFileName(),
           fuUpload.getContentType());
        }
/**/    ssnSession.info(sMsg);    // Showing a message in my feedback panel   
/**/
        ...
      }
    };
    btnUpload.setDefaultFormProcessing(false);
    frmForm.add(btnUpload);

-- 
View this message in context: 
http://www.nabble.com/FileUploadField-blocks-component-submission-when-an-empty-file-is-selected-tp25855504p25859544.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