IDEMPIERE-1605 - Save path when working with attachments.
This commit is contained in:
parent
52c4a94a22
commit
c50915609c
|
@ -64,6 +64,11 @@ public final class Attachment extends CDialog
|
|||
*/
|
||||
private static final long serialVersionUID = 2497487523050526742L;
|
||||
|
||||
/**
|
||||
* Save the last path selected
|
||||
*/
|
||||
private static String lastPath = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* loads Attachment, if ID <> 0
|
||||
|
@ -424,7 +429,8 @@ public final class Attachment extends CDialog
|
|||
private void loadFile()
|
||||
{
|
||||
log.info("");
|
||||
JFileChooser chooser = new JFileChooser();
|
||||
JFileChooser chooser = new JFileChooser(lastPath);
|
||||
|
||||
chooser.setDialogType(JFileChooser.OPEN_DIALOG);
|
||||
chooser.setDialogTitle(Msg.getMsg(Env.getCtx(), "AttachmentNew"));
|
||||
chooser.setMultiSelectionEnabled(true);
|
||||
|
@ -463,6 +469,10 @@ public final class Attachment extends CDialog
|
|||
}
|
||||
}
|
||||
}
|
||||
// Save path of file
|
||||
if (files.length>0) {
|
||||
lastPath = files[0].getParentFile().getAbsolutePath();
|
||||
}
|
||||
} // getFileName
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue