/** * Generates the hml code for an empty table.<p> * * @return html code */ public String htmlEmptyTable() { StringBuffer html = new StringBuffer(512); html.append("<tr class='oddrowbg'>\n"); html.append("\t<td align='center' colspan='"); html.append(getWidth()); html.append("'>\n"); html.append(Messages.get().getBundle(getWp().getLocale()).key(Messages.GUI_LIST_EMPTY_0)); html.append("\t</td>\n"); html.append("</tr>\n"); return html.toString(); }
/** * Generates the hml code for an empty table.<p> * * @return html code */ public String htmlEmptyTable() { StringBuffer html = new StringBuffer(512); html.append("<tr class='oddrowbg'>\n"); html.append("\t<td align='center' colspan='"); html.append(getWidth()); html.append("'>\n"); html.append(Messages.get().getBundle(getWp().getLocale()).key(Messages.GUI_LIST_EMPTY_0)); html.append("\t</td>\n"); html.append("</tr>\n"); return html.toString(); }
/** * Generates the need html code for ending a list.<p> * * @return html code */ protected String htmlEnd() { StringBuffer html = new StringBuffer(512); html.append("\t\t\t</td></tr>\n"); html.append("\t\t</table>\n"); if (isBoxed()) { html.append(getWp().dialogBlock(CmsWorkplace.HTML_END, m_name.key(getWp().getLocale()), false)); } html.append("</div>\n"); return html.toString(); }
/** * Generates the need html code for ending a list.<p> * * @return html code */ protected String htmlEnd() { StringBuffer html = new StringBuffer(512); html.append("\t\t\t</td></tr>\n"); html.append("\t\t</table>\n"); if (isBoxed()) { html.append(getWp().dialogBlock(CmsWorkplace.HTML_END, m_name.key(getWp().getLocale()), false)); } html.append("</div>\n"); 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#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(); }
result.append("' type='button' value='"); result.append( Messages.get().container(Messages.GUI_ORGUNITUSERS_BUTTON_CONFIRM_0).key(getFirstWp().getLocale())); result.append("' onclick=\"submitAction('"); result.append(CmsDialog.DIALOG_CONFIRMED); result.append("' type='button' value='"); result.append( Messages.get().container(Messages.GUI_ORGUNITUSERS_BUTTON_CANCEL_0).key(getFirstWp().getLocale())); result.append("' onclick=\"submitAction('"); result.append(CmsDialog.DIALOG_CANCEL);
/** * returns the csv output for a cell.<p> * * @param item the item to render the cell for * * @return csv output */ public String csvCell(CmsListItem item) { if (!isVisible()) { return ""; } StringBuffer csv = new StringBuffer(512); if (m_formatter == null) { // unformatted output if (item.get(m_id) != null) { // null values are not showed by default csv.append(item.get(m_id).toString()); } } else { // formatted output csv.append(m_formatter.format(item.get(m_id), getWp().getLocale())); } return csv.toString(); }
/** * Returns the csv output for a column header.<p> * * @return csv header */ public String csvHeader() { if (!isVisible()) { return ""; } return getName().key(getWp().getLocale()); }
html.append(getWp().dialogBlock(CmsWorkplace.HTML_START, m_name.key(getWp().getLocale()), false));
/** * Returns the csv output for a column header.<p> * * @return csv header */ public String csvHeader() { if (!isVisible()) { return ""; } return getName().key(getWp().getLocale()); }
/** * Returns the html code for the default action content.<p> * * @return html code */ protected String defaultActionHtmlContent() { StringBuffer result = new StringBuffer(2048); result.append("<form name='"); result.append(getList().getId()); result.append("-form' action='"); result.append(getDialogRealUri()); result.append("' method='post' class='nomargin'"); if (getList().getMetadata().isSearchable()) { result.append(" onsubmit=\"listSearchAction('"); result.append(getList().getId()); result.append("', '"); result.append(getList().getMetadata().getSearchAction().getId()); result.append("', '"); result.append(getList().getMetadata().getSearchAction().getConfirmationMessage().key(getLocale())); result.append("');\""); } result.append(">\n"); result.append(allParamsAsHidden()); result.append("\n"); getList().setWp(this); result.append(getList().listHtml()); result.append("\n</form>\n"); return result.toString(); }
/** * Returns the html code for the default action content.<p> * * @return html code */ protected String defaultActionHtmlContent() { StringBuffer result = new StringBuffer(2048); result.append("<form name='"); result.append(getList().getId()); result.append("-form' action='"); result.append(getDialogRealUri()); result.append("' method='post' class='nomargin'"); if (getList().getMetadata().isSearchable()) { result.append(" onsubmit=\"listSearchAction('"); result.append(getList().getId()); result.append("', '"); result.append(getList().getMetadata().getSearchAction().getId()); result.append("', '"); result.append(getList().getMetadata().getSearchAction().getConfirmationMessage().key(getLocale())); result.append("');\""); } result.append(">\n"); result.append(allParamsAsHidden()); result.append("\n"); getList().setWp(this); result.append(getList().listHtml()); result.append("\n</form>\n"); return result.toString(); }
/** * Calls the <code>{@link #getListItems}</code> method and catches any exception.<p> */ protected void fillList() { try { getList().setContent(getListItems()); // initialize detail columns Iterator<CmsListItemDetails> itDetails = getList().getMetadata().getItemDetailDefinitions().iterator(); while (itDetails.hasNext()) { initializeDetail(itDetails.next().getId()); } } catch (Exception e) { throw new CmsRuntimeException( Messages.get().container(Messages.ERR_LIST_FILL_1, getList().getName().key(getLocale()), null), e); } }
/** * Calls the <code>{@link #getListItems}</code> method and catches any exception.<p> */ protected void fillList() { try { getList().setContent(getListItems()); // initialize detail columns Iterator itDetails = getList().getMetadata().getItemDetailDefinitions().iterator(); while (itDetails.hasNext()) { initializeDetail(((CmsListItemDetails)itDetails.next()).getId()); } } catch (Exception e) { throw new CmsRuntimeException(Messages.get().container( Messages.ERR_LIST_FILL_1, getList().getName().key(getLocale()), null), e); } }
/** * A convenient method to throw a list unsupported * action runtime exception.<p> * * Should be triggered if your list implementation does not * support the <code>{@link #getParamListAction()}</code> * action.<p> * * @throws CmsRuntimeException always to signal that this operation is not supported */ protected void throwListUnsupportedActionException() throws CmsRuntimeException { throw new CmsRuntimeException( Messages.get().container( Messages.ERR_LIST_UNSUPPORTED_ACTION_2, getList().getName().key(getLocale()), getParamListAction())); }
/** * A convenient method to throw a list unsupported * action runtime exception.<p> * * Should be triggered if your list implementation does not * support the <code>{@link #getParamListAction()}</code> * action.<p> * * @throws CmsRuntimeException always to signal that this operation is not supported */ protected void throwListUnsupportedActionException() throws CmsRuntimeException { throw new CmsRuntimeException(Messages.get().container( Messages.ERR_LIST_UNSUPPORTED_ACTION_2, getList().getName().key(getLocale()), getParamListAction())); }