FR [ 1943731 ] Window data export functionality

https://sourceforge.net/tracker/?func=detail&atid=879335&aid=1943731&group_id=176962


Fix NPE error when role has no export rights
This commit is contained in:
teo_sarca 2009-02-13 14:50:11 +00:00
parent 05dd81ba87
commit e112bcdad6
1 changed files with 3 additions and 3 deletions

View File

@ -280,7 +280,7 @@ public final class APanel extends CPanel
private AppsAction aPrevious, aNext, aParent, aDetail, aFirst, aLast, private AppsAction aPrevious, aNext, aParent, aDetail, aFirst, aLast,
aNew, aCopy, aDelete, aPrint, aPrintPreview, aNew, aCopy, aDelete, aPrint, aPrintPreview,
aExport, aExport = null,
aRefresh, aHistory, aAttachment, aChat, aMulti, aFind, aRefresh, aHistory, aAttachment, aChat, aMulti, aFind,
aWorkflow, aZoomAcross, aRequest, aWinSize, aArchive; aWorkflow, aZoomAcross, aRequest, aWinSize, aArchive;
/** Ignore Button */ /** Ignore Button */
@ -318,7 +318,7 @@ public final class APanel extends CPanel
aPrintPreview = addAction("PrintPreview", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.SHIFT_MASK+Event.ALT_MASK), false); aPrintPreview = addAction("PrintPreview", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.SHIFT_MASK+Event.ALT_MASK), false);
if (MRole.getDefault().isCanExport()) if (MRole.getDefault().isCanExport())
{ {
aExport = addAction("Export", mFile, null, false); aExport = addAction("Export", mFile, null, false);
} }
mFile.addSeparator(); mFile.addSeparator();
aEnd = addAction("End", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), false); aEnd = addAction("End", mFile, KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK), false);
@ -1498,7 +1498,7 @@ public final class APanel extends CPanel
cmd_print(); cmd_print();
else if (cmd.equals(aPrintPreview.getName())) else if (cmd.equals(aPrintPreview.getName()))
cmd_print(true); cmd_print(true);
else if (cmd.equals(aExport.getName())) else if (aExport != null && cmd.equals(aExport.getName()))
cmd_export(); cmd_export();
else if (cmd.equals(aEnd.getName())) else if (cmd.equals(aEnd.getName()))
cmd_end(false); cmd_end(false);