/** * @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.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(); }
onClic.append(getListId()); onClic.append("', '"); onClic.append(getId()); onClic.append("', '"); if ((getColumnForTexts() == null) || (getItem().get(getColumnForTexts()) == null) || confirmationMessage.equals(new MessageFormat(confirmationMessage, locale).format(new Object[] {""}))) { onClic.append("conf" + getId()); } else { onClic.append(CmsStringUtil.escapeJavaScript(confirmationMessage));
onClic.append(getListId()); onClic.append("', '"); onClic.append(getId()); onClic.append("', '"); if ((getColumnForTexts() == null) || (getItem().get(getColumnForTexts()) == null) || confirmationMessage.equals(new MessageFormat(confirmationMessage, locale).format(new Object[] {""}))) { onClic.append("conf" + getId()); } else { onClic.append(CmsStringUtil.escapeJavaScript(confirmationMessage));
/** * @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); }
/** * @see org.opencms.workplace.tools.accounts.A_CmsGroupUsersList#setStateActionCol(org.opencms.workplace.list.CmsListMetadata) */ @Override protected void setStateActionCol(CmsListMetadata metadata) { // create column for state change CmsListColumnDefinition stateCol = new CmsListColumnDefinition(LIST_COLUMN_STATE); stateCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_STATE_0)); stateCol.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_COLS_STATE_HELP_0)); stateCol.setWidth("20"); stateCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER); stateCol.setSorteable(false); // add add action CmsListDirectAction stateAction = new CmsListDirectAction(LIST_ACTION_ADD); stateAction.setName(Messages.get().container(Messages.GUI_USERS_LIST_DEFACTION_ADD_NAME_0)); stateAction.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_DEFACTION_ADD_HELP_0)); stateAction.setIconPath(ICON_ADD); stateCol.addDirectAction(stateAction); // add it to the list definition metadata.addColumn(stateCol); // keep the id m_addActionIds.add(stateAction.getId()); }
/** * @see org.opencms.workplace.tools.accounts.A_CmsUserGroupsList#setStateActionCol(org.opencms.workplace.list.CmsListMetadata) */ @Override protected void setStateActionCol(CmsListMetadata metadata) { // create column for state change CmsListColumnDefinition stateCol = new CmsListColumnDefinition(LIST_COLUMN_STATE); stateCol.setName(Messages.get().container(Messages.GUI_GROUPS_LIST_COLS_STATE_0)); stateCol.setHelpText(Messages.get().container(Messages.GUI_GROUPS_LIST_COLS_STATE_HELP_0)); stateCol.setWidth("20"); stateCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER); stateCol.setSorteable(false); // add it to the list definition metadata.addColumn(stateCol); // add add action CmsListDirectAction stateAction = new CmsListDirectAction(LIST_ACTION_ADD); stateAction.setName(Messages.get().container(Messages.GUI_GROUPS_LIST_DEFACTION_ADD_NAME_0)); stateAction.setHelpText(Messages.get().container(Messages.GUI_GROUPS_LIST_DEFACTION_ADD_HELP_0)); stateAction.setIconPath(ICON_ADD); stateCol.addDirectAction(stateAction); // keep the id m_addActionIds.add(stateAction.getId()); } }
/** * @see org.opencms.workplace.tools.accounts.A_CmsGroupUsersList#setStateActionCol(org.opencms.workplace.list.CmsListMetadata) */ @Override protected void setStateActionCol(CmsListMetadata metadata) { // create column for state change CmsListColumnDefinition stateCol = new CmsListColumnDefinition(LIST_COLUMN_STATE); stateCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_STATE_0)); stateCol.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_COLS_STATE_HELP_0)); stateCol.setWidth("20"); stateCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER); stateCol.setSorteable(false); // add remove action CmsListDirectAction stateAction = new CmsListDirectAction(LIST_ACTION_REMOVE); stateAction.setName(Messages.get().container(Messages.GUI_USERS_LIST_DEFACTION_REMOVE_NAME_0)); stateAction.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_DEFACTION_REMOVE_HELP_0)); stateAction.setIconPath(ICON_MINUS); stateCol.addDirectAction(stateAction); // add it to the list definition metadata.addColumn(stateCol); // keep the id m_removeActionIds.add(stateAction.getId()); }
/** * @see org.opencms.workplace.tools.accounts.A_CmsOrgUnitUsersList#setStateActionCol(org.opencms.workplace.list.CmsListMetadata) */ @Override protected void setStateActionCol(CmsListMetadata metadata) { // create column for state change CmsListColumnDefinition stateCol = new CmsListColumnDefinition(LIST_COLUMN_STATE); stateCol.setName(Messages.get().container(Messages.GUI_ORGUNITUSERS_LIST_COLS_STATE_0)); stateCol.setHelpText(Messages.get().container(Messages.GUI_ORGUNITUSERS_LIST_COLS_STATE_HELP_0)); stateCol.setWidth("20"); stateCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER); stateCol.setSorteable(false); // add remove action CmsListDirectAction stateAction = new CmsListDirectAction(LIST_ACTION_REMOVE); stateAction.setName(Messages.get().container(Messages.GUI_ORGUNITUSERS_LIST_DEFACTION_REMOVE_NAME_0)); stateAction.setHelpText(Messages.get().container(Messages.GUI_ORGUNITUSERS_LIST_DEFACTION_REMOVE_HELP_0)); stateAction.setIconPath(ICON_MINUS); stateCol.addDirectAction(stateAction); // add it to the list definition metadata.addColumn(stateCol); // keep the id m_removeActionIds.add(stateAction.getId()); }
/** * @see org.opencms.workplace.tools.accounts.A_CmsRoleUsersList#setColumns(org.opencms.workplace.list.CmsListMetadata) */ @Override protected void setColumns(CmsListMetadata metadata) { if (m_lazy) { metadata.setSelfManaged(true); } super.setColumns(metadata); // create column for state change CmsListColumnDefinition stateCol = new CmsListColumnDefinition(LIST_COLUMN_STATE); stateCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_STATE_0)); stateCol.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_COLS_STATE_HELP_0)); stateCol.setWidth("20"); stateCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER); stateCol.setSorteable(false); // add remove action CmsListDirectAction stateAction = new CmsListDirectAction(LIST_ACTION_REMOVE); stateAction.setName(Messages.get().container(Messages.GUI_USERS_LIST_DEFACTION_REMOVE_NAME_0)); stateAction.setHelpText(Messages.get().container(Messages.GUI_ROLEUSERS_LIST_DEFACTION_REMOVE_HELP_0)); stateAction.setIconPath(ICON_MINUS); stateCol.addDirectAction(stateAction); // add it to the list definition metadata.addColumn(stateCol, 1); // keep the id m_removeActionIds.add(stateAction.getId()); }
m_addActionIds.add(stateAction.getId());
m_addActionIds.add(stateAction.getId());