Changeset 3909


Ignore:
Timestamp:
Oct 21, 2010, 2:18:32 PM (13 years ago)
Author:
olle
Message:

Refs #709. Class/file action/file/SaveFile.java in client/servlet/
updated to display an error message if no file has been selected:

  1. Public method void runMe() updated to check that the name

of a file item is not null or an empty string before attempting
to save the item. If no item name exists, the method returns with
an error message set that asks the user to select a file to upload.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/file/SaveFile.java

    r3475 r3909  
    3737import org.proteios.core.FileType;
    3838import org.proteios.core.ItemFactory;
     39import org.proteios.gui.form.FileField;
    3940import org.proteios.gui.form.FormFactory;
    4041import se.lu.thep.waf.ActionException;
     
    9697      if (!item.isFormField())
    9798      {
     99        if (item.getName() == null || item.getName().equals(""))
     100        {
     101          setError("Please select a file to upload");
     102          return;
     103        }
    98104        if (parentDirId == null)
    99105          throw new ActionException("No active directory");
Note: See TracChangeset for help on using the changeset viewer.