/** * Help method to resolve the help text to use.<p> * * @param locale the used locale * * @return the help text */ protected String resolveHelpText(Locale locale) { String helpText = getHelpText().key(locale); if ((getColumnForTexts() != null) && (getItem().get(getColumnForTexts()) != null)) { helpText = new MessageFormat(helpText, locale).format(new Object[] {getItem().get(getColumnForTexts())}); } return helpText; }
/** * Help method to resolve the help text to use.<p> * * @param locale the used locale * * @return the help text */ protected String resolveHelpText(Locale locale) { String helpText = getHelpText().key(locale); if ((getColumnForTexts() != null) && (getItem().get(getColumnForTexts()) != null)) { helpText = new MessageFormat(helpText, locale).format(new Object[] {getItem().get(getColumnForTexts())}); } return helpText; }
if ((getColumnForTexts() != null) && (getItem().get(getColumnForTexts()) != null)) { confirmationMessage = new MessageFormat(confirmationMessage, locale).format(new Object[] {getItem().get( getColumnForTexts())}); onClic.append("', '"); if ((getColumnForTexts() == null) || (getItem().get(getColumnForTexts()) == null) || confirmationMessage.equals(new MessageFormat(confirmationMessage, locale).format(new Object[] {""}))) { onClic.append("conf" + getId()); onClic.append(CmsStringUtil.escapeJavaScript(getItem().getId())); onClic.append("');"); return onClic.toString();
if ((getColumnForTexts() != null) && (getItem().get(getColumnForTexts()) != null)) { confirmationMessage = new MessageFormat(confirmationMessage, locale).format( new Object[] {getItem().get(getColumnForTexts())}); onClic.append("', '"); if ((getColumnForTexts() == null) || (getItem().get(getColumnForTexts()) == null) || confirmationMessage.equals(new MessageFormat(confirmationMessage, locale).format(new Object[] {""}))) { onClic.append("conf" + getId()); onClic.append(CmsStringUtil.escapeJavaScript(getItem().getId())); onClic.append("');"); return onClic.toString();
/** * @see org.opencms.workplace.list.I_CmsListDirectAction#confirmationTextHtml() */ public String confirmationTextHtml() { StringBuffer html = new StringBuffer(512); String cm = getConfirmationMessage().key(getWp().getLocale()); String confMessage = new MessageFormat(cm, getWp().getLocale()).format(new Object[] {""}); if ((getColumnForTexts() == null) || confMessage.equals( new MessageFormat(cm, getWp().getLocale()).format(new Object[] {getItem().get(getColumnForTexts())}))) { html.append(A_CmsListAction.defaultConfirmationHtml(getId(), confMessage)); } return html.toString(); }
/** * @see org.opencms.workplace.list.I_CmsListDirectAction#confirmationTextHtml() */ public String confirmationTextHtml() { StringBuffer html = new StringBuffer(512); String cm = getConfirmationMessage().key(getWp().getLocale()); String confMessage = new MessageFormat(cm, getWp().getLocale()).format(new Object[] {""}); if ((getColumnForTexts() == null) || confMessage.equals(new MessageFormat(cm, getWp().getLocale()).format(new Object[] {getItem().get( getColumnForTexts())}))) { html.append(A_CmsListAction.defaultConfirmationHtml(getId(), confMessage)); } return html.toString(); }
/** * @see org.opencms.workplace.list.I_CmsListDirectAction#helpTextHtml() */ public String helpTextHtml() { StringBuffer html = new StringBuffer(512); String ht = getHelpText().key(getWp().getLocale()); String helptext = new MessageFormat(ht, getWp().getLocale()).format(new Object[] {""}); if ((getColumnForTexts() == null) || helptext.equals(new MessageFormat(ht, getWp().getLocale()).format(new Object[] {getItem().get( getColumnForTexts())}))) { html.append(A_CmsHtmlIconButton.defaultHelpHtml(getId(), helptext)); } return html.toString(); }
/** * @see org.opencms.workplace.list.I_CmsListDirectAction#helpTextHtml() */ public String helpTextHtml() { StringBuffer html = new StringBuffer(512); String ht = getHelpText().key(getWp().getLocale()); String helptext = new MessageFormat(ht, getWp().getLocale()).format(new Object[] {""}); if ((getColumnForTexts() == null) || helptext.equals( new MessageFormat(ht, getWp().getLocale()).format(new Object[] {getItem().get(getColumnForTexts())}))) { html.append(A_CmsHtmlIconButton.defaultHelpHtml(getId(), helptext)); } return html.toString(); }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#buttonHtml(CmsWorkplace) */ public String buttonHtml(CmsWorkplace wp) { if (!isVisible()) { return ""; } return A_CmsHtmlIconButton.defaultButtonHtml( resolveButtonStyle(), getId() + getItem().getId(), getId(), resolveName(wp.getLocale()), resolveHelpText(wp.getLocale()), isEnabled(), getIconPath(), null, resolveOnClic(wp.getLocale()), getColumnForTexts() == null, null); }
/** * @see org.opencms.workplace.tools.I_CmsHtmlIconButton#buttonHtml(CmsWorkplace) */ public String buttonHtml(CmsWorkplace wp) { if (!isVisible()) { return ""; } return A_CmsHtmlIconButton.defaultButtonHtml( resolveButtonStyle(), getId() + getItem().getId(), getId(), resolveName(wp.getLocale()), resolveHelpText(wp.getLocale()), isEnabled(), getIconPath(), null, resolveOnClic(wp.getLocale()), getColumnForTexts() == null, null); }