/** * @see org.opencms.workplace.list.CmsListDirectAction#resolveOnClic(java.util.Locale) */ @Override protected String resolveOnClic(Locale locale) { String confirmationMessage = getConfirmationMessage().key(locale); if ((getColumnForTexts() != null) && (getItem().get(getColumnForTexts()) != null)) { confirmationMessage = new MessageFormat(confirmationMessage, locale).format(new Object[] {getItem().get( getColumnForTexts())}); } StringBuffer onClic = new StringBuffer(128); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(confirmationMessage)) { onClic.append("if (confirm('"); onClic.append(confirmationMessage); onClic.append("')) { "); } onClic.append(jsCode()); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(confirmationMessage)) { onClic.append(" } "); } return onClic.toString(); }
/** * @see org.opencms.workplace.list.CmsListDirectAction#resolveOnClic(java.util.Locale) */ @Override protected String resolveOnClic(Locale locale) { String confirmationMessage = getConfirmationMessage().key(locale); if ((getColumnForTexts() != null) && (getItem().get(getColumnForTexts()) != null)) { confirmationMessage = new MessageFormat(confirmationMessage, locale).format( new Object[] {getItem().get(getColumnForTexts())}); } StringBuffer onClic = new StringBuffer(128); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(confirmationMessage)) { onClic.append("if (confirm('"); onClic.append(confirmationMessage); onClic.append("')) { "); } onClic.append(jsCode()); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(confirmationMessage)) { onClic.append(" } "); } return onClic.toString(); }