} catch (Exception e) { logger.warn("Couldn't configure users", e); SessionMessages.addWarningMessage(ElementsThreadLocals.getText("couldnt.set.up.user.management._", e));
@Override public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception { String msg = ElementsThreadLocals.getText("object.not.found._", key); SessionMessages.addWarningMessage(msg); new ForwardResolution("/m/pageactions/redirect-to-last-working-page.jsp").execute(request, response); } }
public void loadObjects() { //Se si passano dati sbagliati al criterio restituisco messaggio d'errore // ma nessun risultato try { TableCriteria criteria = new TableCriteria(baseTable); if(searchForm != null) { searchForm.configureCriteria(criteria); } if(!StringUtils.isBlank(sortProperty) && !StringUtils.isBlank(sortDirection)) { try { PropertyAccessor orderByProperty = classAccessor.getProperty(sortProperty); criteria.orderBy(orderByProperty, sortDirection); } catch (NoSuchFieldException e) { logger.error("Can't order by " + sortProperty + ", property accessor not found", e); } } objects = QueryUtils.getObjects(session, getBaseQuery(), criteria, this, firstResult, maxResults); } catch (ClassCastException e) { objects=new ArrayList<Object>(); logger.warn("Incorrect Field Type", e); SessionMessages.addWarningMessage(ElementsThreadLocals.getText("incorrect.field.type")); } }
protected void doDelete(String[] databaseNames) { for (String current : databaseNames) { if (current == null) { continue; } Database database = DatabaseLogic.findDatabaseByName(persistence.getModel(), current); if (database == null) { SessionMessages.addWarningMessage( "Delete failed. Connection provider not found: " + current); } else { persistence.getModel().getDatabases().remove(database); SessionMessages.addInfoMessage( "Connection provider deleted successfully: " + current); } } }
} catch (Exception e) { logger.warn("Couldn't create calendar", e); SessionMessages.addWarningMessage("Couldn't create calendar: " + e); return; } else { logger.warn("Couldn't create directory {}", dir.getAbsolutePath()); SessionMessages.addWarningMessage( ElementsThreadLocals.getText("couldnt.create.directory", dir.getAbsolutePath()));
@Button(list = "select-tables", key="next", order = 2, type = Button.TYPE_PRIMARY , icon = Button.ICON_RIGHT , iconBefore = false) public Resolution selectTables() { selectUserFields(); rootsForm.readFromRequest(context.getRequest()); rootsForm.writeToObject(selectableRoots); //Recalc roots afterSelectSchemas(); if(roots.isEmpty()) { SessionMessages.addWarningMessage(ElementsThreadLocals.getText("no.page.will.be.generated")); } return buildAppForm(); }
throws Exception { if(dir.exists()) { SessionMessages.addWarningMessage( ElementsThreadLocals.getText("directory.exists.page.not.created._", dir.getAbsolutePath())); return null; if(!detailDir.isDirectory() && !detailDir.mkdir()) { logger.warn("Could not create detail directory {}", detailDir.getAbsolutePath()); SessionMessages.addWarningMessage( ElementsThreadLocals.getText("couldnt.create.directory", detailDir.getAbsolutePath())); } else { logger.warn("Couldn't create directory {}", dir.getAbsolutePath()); SessionMessages.addWarningMessage( ElementsThreadLocals.getText("couldnt.create.directory", dir.getAbsolutePath())); return null;
if(!editChildPage.showInNavigation && !editChildPage.embedded) { String msg = ElementsThreadLocals.getText("the.page._.is.not.embedded.and.not.included.in.navigation", editChildPage.name); SessionMessages.addWarningMessage(msg);
public Resolution deleteAttachments() { if (selection == null || selection.length == 0) { SessionMessages.addWarningMessage(ElementsThreadLocals.getText("text.attachment.noAttachmentSelected")); } else { int counter = 0;
@Button(list = "manage-attachments-upload", key = "text.attachment.upload", order = 1 , icon=Button.ICON_UPLOAD ) @RequiresPermissions(level = AccessLevel.VIEW, permissions = { PERMISSION_EDIT }) @RequiresAuthentication public Resolution uploadAttachment() { if (upload == null) { SessionMessages.addWarningMessage(ElementsThreadLocals.getText("text.attachment.noFileSelected")); } else { try { commonUploadAttachment(); SessionMessages.addInfoMessage(ElementsThreadLocals.getText("text.attachment.uploadSuccessful")); } catch (IOException e) { logger.error("Upload failed", e); SessionMessages.addErrorMessage(ElementsThreadLocals.getText("text.attachment.uploadFailed")); } } return new RedirectResolution(context.getActionPath()) .addParameter("manageAttachments") .addParameter("returnUrl", returnUrl); }
SessionMessages.addWarningMessage( ElementsThreadLocals.getText( "skipped.column._.with.unknown.type._",
XhtmlBuffer buffer = new XhtmlBuffer(); buffer.writeNoHtmlEscape(ElementsThreadLocals.getText("user.management.has.been.configured.please.edit.security.groovy")); SessionMessages.addWarningMessage(buffer);
int deleted = 0; if (selection == null || selection.length == 0) { SessionMessages.addWarningMessage(ElementsThreadLocals.getText("no.object.was.selected")); return new RedirectResolution(appendSearchStringParamIfNecessary(context.getActionPath())); //TODO why is this different from bulkEdit?
@Buttons({ @Button(list = "crud-search", key = "edit", order = 2, icon = Button.ICON_EDIT), @Button(list = "crud-bulk", key = "edit", order = 2, icon = Button.ICON_EDIT) }) @Guard(test = "isBulkOperationsEnabled() && isEditEnabled()", type = GuardType.VISIBLE) @RequiresPermissions(permissions = PERMISSION_EDIT) public Resolution bulkEdit() { if (selection == null || selection.length == 0) { SessionMessages.addWarningMessage(ElementsThreadLocals.getText("no.object.was.selected")); return new RedirectResolution(returnUrl, false); } if (selection.length == 1) { pk = selection[0].split("/"); String url = context.getActionPath() + "/" + getPkForUrl(pk); url = appendSearchStringParamIfNecessary(url); return new RedirectResolution(url) .addParameter("returnUrl", returnUrl) .addParameter("edit"); } setupForm(Mode.BULK_EDIT); disableBlobFields(); return getBulkEditView(); }
otherColumn = fromColumn; SessionMessages.addWarningMessage( ElementsThreadLocals.getText( "detected.type.mismatch.with.column._",
Column toColumn = ref.getActualToColumn(); if(fromColumn.getActualJavaType() != toColumn.getActualJavaType()) { SessionMessages.addWarningMessage( ElementsThreadLocals.getText( "detected.type.mismatch.between.column._.and.column._",