/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { RemoteFileUploadCommand fileUploadCommand = new RemoteFileUploadCommand(); fileUploadCommand.setFileFilter(translateFilter(getFileFilter(context), context)); fileUploadCommand.setFileMaxSize(getFileMaxSize(context)); IView<RComponent> view = getView(context); RAction successCallbackAction = getActionFactory(context).createAction(getFileOpenCallbackAction(context), actionHandler, view, getLocale(context)); fileUploadCommand.setSuccessCallbackAction(successCallbackAction); RAction cancelCallbackAction = getActionFactory(context).createAction(getFileCancelCallbackAction(context), actionHandler, view, getLocale(context)); fileUploadCommand.setCancelCallbackAction(cancelCallbackAction); fileUploadCommand.setFileUrl(ResourceProviderServlet.computeUploadUrl()); registerCommand(fileUploadCommand, context); return super.execute(actionHandler, context); }