/** * @see * org.opencms.workplace.list.A_CmsListDialog#setColumns(org.opencms.workplace.list.CmsListMetadata) */ @SuppressWarnings("unchecked") @Override protected void setColumns(final CmsListMetadata metadata) { // enforce re-invocation of this method because columns are varying and must not be cached: metadata.setVolatile(true); // add column for icon CmsListColumnDefinition iconCol = new CmsListColumnDefinition(LIST_COLUMN_ICON); iconCol.setName(Messages.get().container(Messages.GUI_LIST_LANGUAGECOPY_COL_ICON_NAME_0)); iconCol.setHelpText(Messages.get().container(Messages.GUI_LIST_LANGUAGECOPY_COL_ICON_HELP_0)); iconCol.setAlign(CmsListColumnAlignEnum.ALIGN_LEFT); iconCol.setWidth("16"); iconCol.setSorteable(false); metadata.addColumn(iconCol); iconCol.setPrintable(true); // add column for name CmsListColumnDefinition nameCol = new CmsListColumnDefinition(LIST_COLUMN_PATH); nameCol.setName(Messages.get().container(Messages.GUI_LIST_LANGUAGECOPY_COL_PATH_NAME_0)); nameCol.setHelpText(Messages.get().container(Messages.GUI_LIST_LANGUAGECOPY_COL_PATH_HELP_0)); nameCol.setAlign(CmsListColumnAlignEnum.ALIGN_LEFT); nameCol.setSorteable(true); metadata.addColumn(nameCol); nameCol.setPrintable(true); // add column for resource type CmsListColumnDefinition typeCol = new CmsListColumnDefinition(LIST_COLUMN_RESOURCETYPE); typeCol.setName( Messages.get().container(Messages.GUI_LIST_LANGUAGECOPY_COL_RESOURCETYPE_NAME_0)); typeCol.setHelpText( Messages.get().container(Messages.GUI_LIST_LANGUAGECOPY_COL_RESOURCETYPE_HELP_0)); typeCol.setAlign(CmsListColumnAlignEnum.ALIGN_LEFT); typeCol.setSorteable(true); metadata.addColumn(typeCol); typeCol.setPrintable(true); // add columns for languages: List<Locale> sysLocales = OpenCms.getLocaleManager().getAvailableLocales(); CmsListColumnDefinition langCol; for (Locale locale : sysLocales) { langCol = new CmsListColumnDefinition(locale.toString()); langCol.setName( Messages.get() .container( Messages.GUI_LIST_LANGUAGECOPY_COL_LANGUAGE_NAME_1, new Object[] {locale.toString()})); langCol.setHelpText( Messages.get().container(Messages.GUI_LIST_LANGUAGECOPY_COL_LANGUAGE_HELP_0)); langCol.setAlign(CmsListColumnAlignEnum.ALIGN_LEFT); langCol.setSorteable(false); metadata.addColumn(langCol); langCol.setPrintable(true); } }
/** * @see * org.opencms.workplace.list.A_CmsListDialog#setMultiActions(org.opencms.workplace.list.CmsListMetadata) */ @Override protected void setMultiActions(final CmsListMetadata metadata) { // add copy multi action CmsListMultiAction deleteMultiAction = new CmsListMultiAction(LIST_MACTION_COPY); deleteMultiAction.setName( Messages.get().container(Messages.GUI_LIST_SEARCHINDEX_MACTION_COPY_NAME_0)); deleteMultiAction.setHelpText( Messages.get().container(Messages.GUI_LIST_SEARCHINDEX_MACTION_COPY_HELP_0)); deleteMultiAction.setIconPath(ICON_MULTI_ADD); metadata.addMultiAction(deleteMultiAction); }