public void uploadAndReturn(ReturnEvent event) { if (event.getReturnValue() == null) return; String imageType = (String) event.getReturnValue(); byte[] picture = (byte[]) event.getReturnParameters().get("picture"); if (picture != null) { this.realPerson.setImage(picture); this.imageSource = JsfUtils.getVirtualImageUrl(picture, "realPic" + (counter++)); } }
public void returnedContentTypeDialog(ReturnEvent event) { if (event.getReturnValue() == null) { return; } MultiMediaMaterialType materialType = (MultiMediaMaterialType) event.getReturnParameters().get(Constants.KEY_RETURN_FROM_DIALOG); multiMediaBean.getContentManagement().setMaterialType(materialType); }
public void returnedWorkGroupDialog(ReturnEvent event) { if (event.getReturnValue() == null) { return; } AbstractWorkGroup workGroup = (AbstractWorkGroup) event.getReturnParameters().get(Constants.KEY_RETURN_FROM_DIALOG); multiMediaBean.getContentManagement().setWorkGroup(workGroup); }
public void returnedDownloadAccessModuleDialog(ReturnEvent event) { if (event.getReturnValue() == null) { return; } AccessModule accessModule = (AccessModule) event.getReturnParameters().get(Constants.KEY_RETURN_FROM_DIALOG); multiMediaBean.getContentManagement().setDownLoadAccessModule(accessModule); }
public void returnFromDeleteDialog(ReturnEvent event) { Integer deleteConfirm = (Integer) event.getReturnValue(); if (deleteConfirm != null && deleteConfirm == 0) { if (JsfUtils.resolveVariable("row") != null) { UserFavoriteSubjectRowData rowData = (UserFavoriteSubjectRowData) JsfUtils.resolveVariable("row"); UserFavoriteSubject selectedSubject = (UserFavoriteSubject) rowData.getEntity(); NliSdiServiceProxy.getInstance().removeUserFavoriteSubject(selectedSubject); subjectModel.refresh(); } } }
public void returnFromDeleteNewItemDialog(ReturnEvent event) { Integer deleteConfirm = (Integer) event.getReturnValue(); if (deleteConfirm != null && deleteConfirm == 0) { NewsWebUtil.getInstance() .deleteDigitalFromNewItems( (BibliographicRecord) NliUnimarcStorageServiceProxy.getInstance() .findById( BibliographicRecord.class, (Long) JsfUtils.getFromPageFlow(Constants.RECORD_ID)), (VirtualContentManagement) contentManagementRowData.getEntity()); } }
public void returnDeleteHighVersionDialogValue(ReturnEvent event) { Integer deleteConfirm = (Integer) event.getReturnValue(); if (deleteConfirm == 0) { try { addMultiMediaBean.setLargeThumbFileName(""); multiMedia.setLargeThumbnail(null); multiMedia.setLargeThumbSystemic(true); } catch (Exception e) { e.printStackTrace(); ErrorReportingUtils.getInstance().reportError(e); } } }
public void returnDeleteFulltextArchiveDialogValue(ReturnEvent event) { Integer deleteConfirm = (Integer) event.getReturnValue(); if (deleteConfirm == 0) { try { addMultiMediaBean.setFulltextFileName(""); multiMedia.setFulltextFile(null); multiMedia.setFulltextFileSystemic(true); } catch (Exception e) { e.printStackTrace(); ErrorReportingUtils.getInstance().reportError(e); } } }
public void returnFullTextDialogValue(ReturnEvent event) { Integer confirm = (Integer) event.getReturnValue(); if (confirm == 0) { try { multiMediaBean.getContentManagement().setFullText(true); NliMultiMediaServiceProxy.getInstance() .updateVirtualContentManagement(multiMediaBean.getContentManagement(), null, false); contentManagementRowData.setFullText(true); } catch (Exception e) { e.printStackTrace(); ErrorReportingUtils.getInstance().reportError(e); } } }
@SuppressWarnings("unchecked") public void returnOptions(ReturnEvent event) { Object value = event.getReturnValue(); StringBuffer buffer = new StringBuffer(); int addedPrice = 0; if (value instanceof List) { for (CarOption option : (List<CarOption>) value) { addedPrice = addedPrice + option.getPrice(); if (buffer.length() != 0) buffer.append(", "); buffer.append(option.getName()); } } _options.setValue(buffer.toString()); Integer price = (Integer) _price.getValue(); _price.setValue(new Integer(price.intValue() + addedPrice)); }
public void returnDeleteDialogValue(ReturnEvent event) { Integer deleteConfirm = (Integer) event.getReturnValue(); if (deleteConfirm == 0) { try { MultiMedia multiMedia = CMSUtil.getMultiMedia(multiMediaBean.getContentManagement(), false, false, false); NliMultiMediaServiceProxy.getInstance() .removeContent( multiMediaBean.getContentManagement().getArchiveId(), multiMediaBean.getContentManagement().getId(), multiMedia.getId(), 1, multiMedia.getFileContent().getFileFormate()); } catch (Exception e) { e.printStackTrace(); ErrorReportingUtils.getInstance().reportError(e); } } }