}
if ((isNew() == true && right.hasInsertAccess(getUser()) == true) //
|| (right.hasUpdateAccess(getUser(), data, null) == true && right.isLicenseKeyVisible(getUser(), data) == true)) {
gridBuilder.newSplitPanel(GridSize.COL50);
FieldsetPanel fs = gridBuilder.newFieldset(gridBuilder.getString("plugins.licensemanagement.file1"));
fileUploadPanel1 = new FileUploadPanel(fs.newChildId(), fs, this, true, new PropertyModel<String>(data, "filename1"),
new PropertyModel<byte[]>(data, "file1"));
if (isNew() == false && (data.getFile1() != null || data.getFile2() != null)) {
// Swap files:
fs.add(new IconButtonPanel(fs.newChildId(), IconType.SWAP, getString("plugins.licensemanagement.swapFiles")) {
/**
* @see org.projectforge.web.wicket.flowlayout.IconButtonPanel#onSubmit()
*/
@Override
protected void onSubmit()
{
final byte[] swap = data.getFile1();
final String swapFilename = data.getFilename1();
data.setFile1(data.getFile2());
data.setFilename1(data.getFilename2());
data.setFile2(swap);
data.setFilename2(swapFilename);
}
});
}
gridBuilder.newSplitPanel(GridSize.COL50);
fs = gridBuilder.newFieldset(gridBuilder.getString("plugins.licensemanagement.file2"));
fileUploadPanel2 = new FileUploadPanel(fs.newChildId(), fs, this, true, new PropertyModel<String>(data, "filename2"),
new PropertyModel<byte[]>(data, "file2"));
gridBuilder.newGridPanel();
} else if (right.isLicenseKeyVisible(getUser(), data) == true) {
}
{