KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opencms > workplace > demos > list > CmsListDemo12


1 /*
2  * File : $Source$
3  * Date : $Date$
4  * Version: $Revision$
5  *
6  * This library is part of OpenCms -
7  * the Open Source Content Mananagement System
8  *
9  * Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com)
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * For further information about Alkacon Software GmbH, please see the
22  * company website: http://www.alkacon.com
23  *
24  * For further information about OpenCms, please see the
25  * project website: http://www.opencms.org
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */

31
32 package org.opencms.workplace.demos.list;
33
34 import org.opencms.file.CmsGroup;
35 import org.opencms.file.CmsUser;
36 import org.opencms.i18n.CmsMessageContainer;
37 import org.opencms.jsp.CmsJspActionElement;
38 import org.opencms.main.CmsException;
39 import org.opencms.main.CmsRuntimeException;
40 import org.opencms.util.CmsStringUtil;
41 import org.opencms.util.CmsUUID;
42 import org.opencms.workplace.CmsDialog;
43 import org.opencms.workplace.list.A_CmsListDialog;
44 import org.opencms.workplace.list.A_CmsListDirectJsAction;
45 import org.opencms.workplace.list.CmsListColumnAlignEnum;
46 import org.opencms.workplace.list.CmsListColumnDefinition;
47 import org.opencms.workplace.list.CmsListDateMacroFormatter;
48 import org.opencms.workplace.list.CmsListDefaultAction;
49 import org.opencms.workplace.list.CmsListDirectAction;
50 import org.opencms.workplace.list.CmsListIndependentAction;
51 import org.opencms.workplace.list.CmsListItem;
52 import org.opencms.workplace.list.CmsListItemActionIconComparator;
53 import org.opencms.workplace.list.CmsListItemDetails;
54 import org.opencms.workplace.list.CmsListItemDetailsFormatter;
55 import org.opencms.workplace.list.CmsListItemSelectionAction;
56 import org.opencms.workplace.list.CmsListMetadata;
57 import org.opencms.workplace.list.CmsListMultiAction;
58 import org.opencms.workplace.list.CmsListRadioMultiAction;
59 import org.opencms.workplace.list.CmsListSearchAction;
60 import org.opencms.workplace.tools.accounts.Messages;
61
62 import java.util.ArrayList JavaDoc;
63 import java.util.Arrays JavaDoc;
64 import java.util.Date JavaDoc;
65 import java.util.HashMap JavaDoc;
66 import java.util.Iterator JavaDoc;
67 import java.util.List JavaDoc;
68 import java.util.Map JavaDoc;
69
70 import javax.servlet.http.HttpServletRequest JavaDoc;
71 import javax.servlet.http.HttpServletResponse JavaDoc;
72 import javax.servlet.jsp.PageContext JavaDoc;
73
74 /**
75  * User accounts list demo.<p>
76  *
77  * @author Michael Moossen
78  *
79  * @version $Revision$
80  *
81  * @since 6.0.0
82  */

83 public class CmsListDemo12 extends A_CmsListDialog {
84
85     /** list action id constant. */
86     public static final String JavaDoc LIST_ACTION_ACTIVATE = "aa";
87
88     /** list action id constant. */
89     public static final String JavaDoc LIST_ACTION_DEACTIVATE = "ac";
90
91     /** list action id constant. */
92     public static final String JavaDoc LIST_ACTION_DELETE = "ad";
93
94     /** list column id constant. */
95     public static final String JavaDoc LIST_COLUMN_ACTIVATE = "ca";
96
97     /** list column id constant. */
98     public static final String JavaDoc LIST_COLUMN_DELETE = "cd";
99
100     /** list column id constant. */
101     public static final String JavaDoc LIST_COLUMN_EMAIL = "cm";
102
103     /** list column id constant. */
104     public static final String JavaDoc LIST_COLUMN_LASTLOGIN = "cl";
105
106     /** list column id constant. */
107     public static final String JavaDoc LIST_COLUMN_LOGIN = "ci";
108
109     /** list column id constant. */
110     public static final String JavaDoc LIST_COLUMN_NAME = "cn";
111
112     /** list column id constant. */
113     public static final String JavaDoc LIST_COLUMN_SEL1 = "cs1";
114
115     /** list column id constant. */
116     public static final String JavaDoc LIST_COLUMN_SEL2 = "cs2";
117
118     /** list action id constant. */
119     public static final String JavaDoc LIST_DEFACTION_EDIT = "de";
120
121     /** list item detail id constant. */
122     public static final String JavaDoc LIST_DETAIL_GROUPS = "dg";
123
124     /** list independent action id constant. */
125     public static final String JavaDoc LIST_IACTION_REFRESH = "ir";
126
127     /** list id constant. */
128     public static final String JavaDoc LIST_ID = "lsu1";
129
130     /** list action id constant. */
131     public static final String JavaDoc LIST_MACTION_ACTIVATE = "ma";
132
133     /** list independent action id constant. */
134     public static final String JavaDoc LIST_RACTION_SEL1 = "rs1";
135
136     /** list independent action id constant. */
137     public static final String JavaDoc LIST_RACTION_SEL2 = "rs2";
138
139     /** list multi action id constant. */
140     private static final String JavaDoc LIST_MACTION_COMPARE = "mc";
141
142     /** parameter name for the user id. */
143     private static final String JavaDoc PARAM_USERID = "userid";
144
145     /**
146      * Public constructor.<p>
147      *
148      * @param jsp an initialized JSP action element
149      */

150     public CmsListDemo12(CmsJspActionElement jsp) {
151
152         super(jsp, LIST_ID, Messages.get().container(Messages.GUI_USERS_LIST_NAME_0), null, null, null);
153     }
154
155     /**
156      * Public constructor with JSP variables.<p>
157      *
158      * @param context the JSP page context
159      * @param req the JSP request
160      * @param res the JSP response
161      */

162     public CmsListDemo12(PageContext JavaDoc context, HttpServletRequest JavaDoc req, HttpServletResponse JavaDoc res) {
163
164         this(new CmsJspActionElement(context, req, res));
165     }
166
167     /**
168      * @see org.opencms.workplace.list.A_CmsListDialog#executeListIndepActions()
169      */

170     public void executeListIndepActions() {
171
172         if (getParamListAction().equals(LIST_IACTION_REFRESH)) {
173             refreshList();
174         }
175         super.executeListIndepActions();
176     }
177
178     /**
179      * @see org.opencms.workplace.list.A_CmsListDialog#executeListMultiActions()
180      */

181     public void executeListMultiActions() throws CmsRuntimeException {
182
183         if (getParamListAction().equals(LIST_MACTION_COMPARE)) {
184             List JavaDoc selItems = getSelectedItems();
185             selItems.toString();
186             // do something with the selected items
187
} else if (getParamListAction().equals(LIST_MACTION_ACTIVATE)) {
188             // execute the activate multiaction
189
try {
190                 Iterator JavaDoc itItems = getSelectedItems().iterator();
191                 while (itItems.hasNext()) {
192                     CmsListItem listItem = (CmsListItem)itItems.next();
193                     String JavaDoc usrName = listItem.get(LIST_COLUMN_LOGIN).toString();
194                     CmsUser user = getCms().readUser(usrName);
195                     if (!user.isEnabled()) {
196                         user.setEnabled(true);
197                         //getCms().writeUser(user);
198
}
199                 }
200             } catch (CmsException e) {
201                 throw new CmsRuntimeException(Messages.get().container(Messages.ERR_ACTIVATE_SELECTED_USERS_0), e);
202             }
203             // refreshing no needed becaus the activate action does not add/remove rows to the list
204
} else {
205             throwListUnsupportedActionException();
206         }
207     }
208
209     /**
210      * @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions()
211      */

212     public void executeListSingleActions() {
213
214         CmsListItem item = getSelectedItem();
215         CmsUUID userId = new CmsUUID(item.getId());
216         String JavaDoc userName = item.get(LIST_COLUMN_LOGIN).toString();
217
218         Map JavaDoc params = new HashMap JavaDoc();
219         params.put(PARAM_USERID, userId);
220         // set action parameter to initial dialog call
221
params.put(CmsDialog.PARAM_ACTION, CmsDialog.DIALOG_INITIAL);
222         if (getParamListAction().equals(LIST_DEFACTION_EDIT)) {
223             // do not really forward to the edit user screen in the demo
224
//getToolManager().jspForwardTool(this, getCurrentToolPath() + "/edit", params);
225
} else if (LIST_ACTION_DELETE.equals(getParamListAction())) {
226             // do not really delete the user in the demo
227
//getCms().deleteUser(userId);
228
// but remove from the list
229
getList().removeItem(userId.toString(), getLocale());
230         } else if (getParamListAction().equals(LIST_ACTION_ACTIVATE)) {
231             // execute the activate action
232
try {
233                 CmsUser user = getCms().readUser(userId);
234                 user.setEnabled(true);
235                 // do not really activate the user in the demo
236
//getCms().writeUser(user);
237
} catch (CmsException e) {
238                 throw new CmsRuntimeException(Messages.get().container(Messages.ERR_ACTIVATE_USER_1, userName), e);
239             }
240         } else if (getParamListAction().equals(LIST_ACTION_DEACTIVATE)) {
241             // execute the activate action
242
try {
243                 CmsUser user = getCms().readUser(userId);
244                 user.setEnabled(false);
245                 // do not really deactivate the user in the demo
246
//getCms().writeUser(user);
247
} catch (CmsException e) {
248                 throw new CmsRuntimeException(Messages.get().container(Messages.ERR_DEACTIVATE_USER_1, userName), e);
249             }
250         } else {
251             throwListUnsupportedActionException();
252         }
253         listSave();
254     }
255
256     /**
257      * @see org.opencms.workplace.list.A_CmsListDialog#fillDetails(java.lang.String)
258      */

259     protected void fillDetails(String JavaDoc detailId) {
260
261         // get content
262
List JavaDoc users = getList().getAllContent();
263         Iterator JavaDoc itUsers = users.iterator();
264         while (itUsers.hasNext()) {
265             CmsListItem item = (CmsListItem)itUsers.next();
266             String JavaDoc userName = item.get(LIST_COLUMN_LOGIN).toString();
267             StringBuffer JavaDoc html = new StringBuffer JavaDoc(512);
268             try {
269                 if (detailId.equals(LIST_DETAIL_GROUPS)) {
270                     // groups
271
Iterator JavaDoc itGroups = getCms().getGroupsOfUser(userName).iterator();
272                     while (itGroups.hasNext()) {
273                         html.append(((CmsGroup)itGroups.next()).getName());
274                         if (itGroups.hasNext()) {
275                             html.append("<br>");
276                         }
277                         html.append("\n");
278                     }
279                 } else {
280                     continue;
281                 }
282             } catch (Exception JavaDoc e) {
283                 // noop
284
}
285             item.set(detailId, html.toString());
286         }
287     }
288
289     /**
290      * @see org.opencms.workplace.list.A_CmsListDialog#getListItems()
291      */

292     protected List JavaDoc getListItems() throws CmsException {
293
294         List JavaDoc ret = new ArrayList JavaDoc();
295         // get content
296
List JavaDoc users = getCms().getUsers(CmsUser.USER_TYPE_SYSTEMUSER);
297         Iterator JavaDoc itUsers = users.iterator();
298         while (itUsers.hasNext()) {
299             CmsUser user = (CmsUser)itUsers.next();
300             CmsListItem item = getList().newItem(user.getId().toString());
301             item.set(LIST_COLUMN_LOGIN, user.getName());
302             item.set(LIST_COLUMN_NAME, user.getFullName());
303             item.set(LIST_COLUMN_EMAIL, user.getEmail());
304             item.set(LIST_COLUMN_LASTLOGIN, new Date JavaDoc(user.getLastlogin()));
305             ret.add(item);
306         }
307         return ret;
308     }
309
310     /**
311      * @see org.opencms.workplace.CmsWorkplace#initMessages()
312      */

313     protected void initMessages() {
314
315         // add specific dialog resource bundle
316
addMessages(Messages.get().getBundleName());
317         addMessages(org.opencms.workplace.demos.list.Messages.get().getBundleName());
318         addMessages(org.opencms.workplace.demos.Messages.get().getBundleName());
319         // add default resource bundles
320
super.initMessages();
321     }
322
323     /**
324      * @see org.opencms.workplace.list.A_CmsListDialog#setColumns(org.opencms.workplace.list.CmsListMetadata)
325      */

326     protected void setColumns(CmsListMetadata metadata) {
327
328         // create column for activation/deactivation
329
CmsListColumnDefinition actCol = new CmsListColumnDefinition(LIST_COLUMN_ACTIVATE);
330         actCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_ACTIVATE_0));
331         actCol.setWidth("30");
332         actCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER);
333         actCol.setListItemComparator(new CmsListItemActionIconComparator());
334         // activate action
335
CmsListDirectAction actAction = new CmsListDirectAction(LIST_ACTION_ACTIVATE) {
336
337             /**
338              * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible()
339              */

340             public boolean isVisible() {
341
342                 String JavaDoc usrId = getItem().getId();
343                 try {
344                     return !getCms().readUser(new CmsUUID(usrId)).isEnabled();
345                 } catch (CmsException e) {
346                     return super.isVisible();
347                 }
348             }
349         };
350         actAction.setName(Messages.get().container(Messages.GUI_USERS_LIST_ACTION_ACTIVATE_NAME_0));
351         actAction.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_ACTION_ACTIVATE_HELP_0));
352         actAction.setConfirmationMessage(Messages.get().container(Messages.GUI_USERS_LIST_ACTION_ACTIVATE_CONF_0));
353         actAction.setIconPath(ICON_INACTIVE);
354         actCol.addDirectAction(actAction);
355
356         // deactivate action
357
CmsListDirectAction deactAction = new CmsListDirectAction(LIST_ACTION_DEACTIVATE) {
358
359             /**
360              * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible()
361              */

362             public boolean isVisible() {
363
364                 String JavaDoc usrId = getItem().getId();
365                 try {
366                     return getCms().readUser(new CmsUUID(usrId)).isEnabled();
367                 } catch (CmsException e) {
368                     return super.isVisible();
369                 }
370             }
371         };
372         deactAction.setName(Messages.get().container(Messages.GUI_USERS_LIST_ACTION_DEACTIVATE_NAME_0));
373         deactAction.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_ACTION_DEACTIVATE_HELP_0));
374         deactAction.setConfirmationMessage(Messages.get().container(Messages.GUI_USERS_LIST_ACTION_DEACTIVATE_CONF_0));
375         deactAction.setIconPath(ICON_ACTIVE);
376         actCol.addDirectAction(deactAction);
377         metadata.addColumn(actCol);
378
379         // create column for deletion
380
CmsListColumnDefinition deleteCol = new CmsListColumnDefinition(LIST_COLUMN_DELETE);
381         deleteCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_DELETE_0));
382         deleteCol.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_COLS_DELETE_HELP_0));
383         deleteCol.setWidth("20");
384         deleteCol.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER);
385         deleteCol.setSorteable(false);
386         // add delete action
387
CmsListDirectAction deleteAction = new A_CmsListDirectJsAction(LIST_ACTION_DELETE) {
388
389             /**
390              * @see org.opencms.workplace.list.A_CmsListDirectJsAction#jsCode()
391              */

392             public String JavaDoc jsCode() {
393
394                 String JavaDoc email = (String JavaDoc)getItem().get(LIST_COLUMN_EMAIL);
395                 return "alert('the email of the select user is:" + CmsStringUtil.escapeJavaScript(email) + "');";
396             }
397         };
398         deleteAction.setName(Messages.get().container(Messages.GUI_USERS_LIST_ACTION_DELETE_NAME_0));
399         deleteAction.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_ACTION_DELETE_HELP_0));
400         deleteAction.setConfirmationMessage(new CmsMessageContainer(null, "Do you want to delete the selected user?"));
401         deleteAction.setIconPath(ICON_DELETE);
402         deleteCol.addDirectAction(deleteAction);
403         metadata.addColumn(deleteCol);
404
405         // create column for login
406
CmsListColumnDefinition loginCol = new CmsListColumnDefinition(LIST_COLUMN_LOGIN);
407         loginCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_LOGIN_0));
408         loginCol.setWidth("20%");
409         loginCol.setSorteable(true);
410         // create default edit action
411
CmsListDefaultAction defEditAction = new CmsListDefaultAction(LIST_DEFACTION_EDIT);
412         defEditAction.setName(Messages.get().container(Messages.GUI_USERS_LIST_DEFACTION_EDIT_NAME_0));
413         defEditAction.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_DEFACTION_EDIT_HELP_0));
414         loginCol.addDefaultAction(defEditAction);
415         metadata.addColumn(loginCol);
416
417         // add column for name
418
CmsListColumnDefinition nameCol = new CmsListColumnDefinition(LIST_COLUMN_NAME);
419         nameCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_USERNAME_0));
420         nameCol.setWidth("30%");
421         nameCol.setSorteable(true);
422         metadata.addColumn(nameCol);
423
424         // add column for email
425
CmsListColumnDefinition emailCol = new CmsListColumnDefinition(LIST_COLUMN_EMAIL);
426         emailCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_EMAIL_0));
427         emailCol.setWidth("30%");
428         emailCol.setSorteable(true);
429         metadata.addColumn(emailCol);
430
431         // add column for last login date
432
CmsListColumnDefinition lastLoginCol = new CmsListColumnDefinition(LIST_COLUMN_LASTLOGIN);
433         lastLoginCol.setName(Messages.get().container(Messages.GUI_USERS_LIST_COLS_LASTLOGIN_0));
434         lastLoginCol.setWidth("20%");
435         lastLoginCol.setSorteable(true);
436         lastLoginCol.setFormatter(CmsListDateMacroFormatter.getDefaultDateFormatter());
437         metadata.addColumn(lastLoginCol);
438
439         // create column for radio button 1
440
CmsListColumnDefinition radioSel1Col = new CmsListColumnDefinition(LIST_COLUMN_SEL1);
441         radioSel1Col.setName(new CmsMessageContainer(null, "V1"));
442         radioSel1Col.setWidth("30");
443         radioSel1Col.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER);
444         radioSel1Col.setSorteable(false);
445         // add item selection action
446
CmsListItemSelectionAction sel1Action = new CmsListItemSelectionAction(LIST_RACTION_SEL1, LIST_MACTION_COMPARE);
447         sel1Action.setName(new CmsMessageContainer(null, "1st Version"));
448         sel1Action.setHelpText(new CmsMessageContainer(null, "Select this file as the 1st version"));
449         sel1Action.setEnabled(true);
450         radioSel1Col.addDirectAction(sel1Action);
451         metadata.addColumn(radioSel1Col);
452
453         // create column for radio button 2
454
CmsListColumnDefinition radioSel2Col = new CmsListColumnDefinition(LIST_COLUMN_SEL2);
455         radioSel2Col.setName(new CmsMessageContainer(null, "V2"));
456         radioSel2Col.setWidth("30");
457         radioSel2Col.setAlign(CmsListColumnAlignEnum.ALIGN_CENTER);
458         radioSel2Col.setSorteable(false);
459         // add item selection action
460
CmsListItemSelectionAction sel2Action = new CmsListItemSelectionAction(LIST_RACTION_SEL2, LIST_MACTION_COMPARE);
461         sel2Action.setName(new CmsMessageContainer(null, "2nd Version"));
462         sel2Action.setHelpText(new CmsMessageContainer(null, "Select this file as the 2nd version"));
463         sel2Action.setEnabled(true);
464         radioSel2Col.addDirectAction(sel2Action);
465         metadata.addColumn(radioSel2Col);
466     }
467
468     /**
469      * @see org.opencms.workplace.list.A_CmsListDialog#setIndependentActions(org.opencms.workplace.list.CmsListMetadata)
470      */

471     protected void setIndependentActions(CmsListMetadata metadata) {
472
473         // add user groups details
474
CmsListItemDetails userGroupsDetails = new CmsListItemDetails(LIST_DETAIL_GROUPS);
475         userGroupsDetails.setAtColumn(LIST_COLUMN_LOGIN);
476         userGroupsDetails.setVisible(false);
477         userGroupsDetails.setShowActionName(Messages.get().container(Messages.GUI_USERS_DETAIL_SHOW_GROUPS_NAME_0));
478         userGroupsDetails.setShowActionHelpText(Messages.get().container(Messages.GUI_USERS_DETAIL_SHOW_GROUPS_HELP_0));
479         userGroupsDetails.setHideActionName(Messages.get().container(Messages.GUI_USERS_DETAIL_HIDE_GROUPS_NAME_0));
480         userGroupsDetails.setHideActionHelpText(Messages.get().container(Messages.GUI_USERS_DETAIL_HIDE_GROUPS_HELP_0));
481         userGroupsDetails.setName(Messages.get().container(Messages.GUI_USERS_DETAIL_GROUPS_NAME_0));
482         userGroupsDetails.setFormatter(new CmsListItemDetailsFormatter(Messages.get().container(
483             Messages.GUI_USERS_DETAIL_GROUPS_NAME_0)));
484         metadata.addItemDetails(userGroupsDetails);
485
486         // add refresh action
487
CmsListIndependentAction refreshAction = new CmsListIndependentAction(LIST_IACTION_REFRESH);
488         refreshAction.setName(new CmsMessageContainer(null, "Refresh"));
489         refreshAction.setHelpText(new CmsMessageContainer(null, "Click here to refresh the list"));
490         refreshAction.setIconPath(ICON_MULTI_ADD);
491         metadata.addIndependentAction(refreshAction);
492     }
493
494     /**
495      * @see org.opencms.workplace.list.A_CmsListDialog#setMultiActions(org.opencms.workplace.list.CmsListMetadata)
496      */

497     protected void setMultiActions(CmsListMetadata metadata) {
498
499         // add compare action
500
CmsListRadioMultiAction compareAction = new CmsListRadioMultiAction(
501             LIST_MACTION_COMPARE,
502             Arrays.asList(new String JavaDoc[] {LIST_RACTION_SEL1, LIST_RACTION_SEL2}));
503         compareAction.setName(new CmsMessageContainer(null, "Compare"));
504         compareAction.setHelpText(new CmsMessageContainer(null, "Click here to compare the two selected versions"));
505         compareAction.setIconPath(ICON_ADD);
506         metadata.addMultiAction(compareAction);
507
508         // add the activate user multi action
509
CmsListMultiAction activateUser = new CmsListMultiAction(LIST_MACTION_ACTIVATE);
510         activateUser.setName(Messages.get().container(Messages.GUI_USERS_LIST_MACTION_ACTIVATE_NAME_0));
511         activateUser.setHelpText(Messages.get().container(Messages.GUI_USERS_LIST_MACTION_ACTIVATE_HELP_0));
512         activateUser.setConfirmationMessage(Messages.get().container(Messages.GUI_USERS_LIST_MACTION_ACTIVATE_CONF_0));
513         activateUser.setIconPath(ICON_MULTI_ACTIVATE);
514         metadata.addMultiAction(activateUser);
515
516         // makes the list searchable by several columns
517
CmsListSearchAction searchAction = new CmsListSearchAction(metadata.getColumnDefinition(LIST_COLUMN_LOGIN));
518         searchAction.addColumn(metadata.getColumnDefinition(LIST_COLUMN_EMAIL));
519         metadata.setSearchAction(searchAction);
520     }
521
522 }
Popular Tags