/** * @see org.opencms.workplace.list.A_CmsListSearchAction#buttonHtml(org.opencms.workplace.CmsWorkplace) */ @Override public String buttonHtml(CmsWorkplace wp) { // delay the composition of the help text as much as possible if (getHelpText() == EMPTY_MESSAGE) { String columns = ""; Iterator it = m_columns.iterator(); while (it.hasNext()) { CmsListColumnDefinition col = (CmsListColumnDefinition)it.next(); columns += "${key." + col.getName().getKey() + "}"; if (it.hasNext()) { columns += ", "; } } if (columns.lastIndexOf(", ") > 0) { columns = columns.substring(0, columns.lastIndexOf(", ")) + " and " + columns.substring(columns.lastIndexOf(", ") + 2); } setHelpText(new CmsMessageContainer( Messages.get(), Messages.GUI_LIST_ACTION_SEARCH_HELP_1, new Object[] {columns})); } return super.buttonHtml(wp); }
/** * @see org.opencms.workplace.list.A_CmsListSearchAction#buttonHtml(org.opencms.workplace.CmsWorkplace) */ @Override public String buttonHtml(CmsWorkplace wp) { // delay the composition of the help text as much as possible if (getHelpText() == EMPTY_MESSAGE) { String columns = ""; Iterator<CmsListColumnDefinition> it = m_columns.iterator(); while (it.hasNext()) { CmsListColumnDefinition col = it.next(); columns += "${key." + col.getName().getKey() + "}"; if (it.hasNext()) { columns += ", "; } } if (columns.lastIndexOf(", ") > 0) { columns = columns.substring(0, columns.lastIndexOf(", ")) + " and " + columns.substring(columns.lastIndexOf(", ") + 2); } setHelpText( new CmsMessageContainer( Messages.get(), Messages.GUI_LIST_ACTION_SEARCH_HELP_1, new Object[] {columns})); } return super.buttonHtml(wp); }