l5m-tools 0.0.2.beta

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,653 @@
1
+ package com.l5m.!REPLACE_STYLE!.engine.worker;
2
+
3
+ import static com.l5m.common.util.ActionConstants.DISPLAY_REFRESH;
4
+ import static com.l5m.common.util.ActionConstants.EXPORT_EXCEL;
5
+ import static com.l5m.common.util.ActionConstants.EXPORT_PDF;
6
+ import static com.l5m.common.util.ActionConstants.FILTER_REFRESH;
7
+ import static com.l5m.common.util.ActionConstants.SORT_RERESH;
8
+ import static com.l5m.common.util.ActionConstants.SUBMIT;
9
+ import static com.l5m.common.util.dcnds.QHTCommonUtil.AA_REFRESH_ZONES_NAME;
10
+ import static com.l5m.common.util.dcnds.QHTCommonUtil.JSON_REFRESH_TYPE;
11
+ import static com.l5m.common.util.dcnds.QHTCommonUtil.PROGRESS_PAGE_POSTBACK;
12
+ import static com.l5m.common.util.dcnds.QHTCommonUtil.REFRESH_TYPE;
13
+ import static com.l5m.customtags.tags.utils.GenerateTagUtil.parseModuleStateBean;
14
+
15
+ import java.io.IOException;
16
+ import java.util.HashMap;
17
+ import java.util.HashSet;
18
+ import java.util.Map;
19
+ import java.util.Set;
20
+
21
+ import javax.servlet.ServletException;
22
+ import javax.servlet.http.HttpServletRequest;
23
+ import javax.servlet.http.HttpSession;
24
+
25
+ import org.apache.commons.lang.StringEscapeUtils;
26
+
27
+ import com.l5m.common.bean.NavigationBean;
28
+ import com.l5m.common.bean.NavigationItemBean;
29
+ import com.l5m.common.bean.StatusMessageBean;
30
+ import com.l5m.common.engine.exporter.ExportInformationBean;
31
+ import com.l5m.common.engine.servicer.ServicerType;
32
+ import com.l5m.common.engine.worker.AbstractWorker;
33
+ import com.l5m.common.util.ActionConstants;
34
+ import com.l5m.common.util.AppConfig;
35
+ import com.l5m.common.util.AppLog;
36
+ import com.l5m.common.util.CommonProperty;
37
+ import com.l5m.common.util.DataUtil;
38
+ import com.l5m.customtags.beans.BaseServicerParaBean;
39
+ import com.l5m.customtags.module.statebean.MultipleSelectStateBean;
40
+ import com.l5m.customtags.module.statebean.PaginatorStateBean;
41
+ import com.l5m.customtags.module.statebean.SortingKeysModuleStateBean;
42
+ import com.l5m.customtags.module.statebean.TopBar2StateBean;
43
+ import com.l5m.customtags.tags.Paginator2Tag;
44
+ import com.l5m.customtags.tags.utils.GenerateTagUtil;
45
+ import com.l5m.customtags.tags.utils.IconStatus;
46
+ import com.l5m.customtags.tags.utils.TopBarIcon;
47
+ import com.l5m.!REPLACE_STYLE!.engine.servicer.!REPLACE_ME_FILE!ServicerImpl;
48
+ import com.l5m.!REPLACE_STYLE!.engine.servicer.!REPLACE_ME_FILE!ServicerImpl.PANEL;
49
+
50
+ public class !REPLACE_ME_FILE!Worker extends AbstractWorker{
51
+
52
+
53
+
54
+ public static enum Descriptions{
55
+ Initializing("Initializing") , RetrievingData("Retrieving Data"), CreatingReport("Creating Report"), Finalize("Finalize")
56
+ ;
57
+ private final String label;
58
+ Descriptions(){
59
+ this.label = this.name();
60
+ }
61
+ Descriptions(String label){
62
+ this.label = label;
63
+ }
64
+ public String getLabel() {
65
+ return label;
66
+ }
67
+ }
68
+ public static final String JSP_TOGO_PERIX = "!REPLACE_ME_FILE!"; /*worker name w/o "Worker"*/
69
+ public static final String JSP_TOGO = JSP_TOGO_PERIX+".jsp";
70
+ public static final String WORKER_NAME = JSP_TOGO_PERIX+"Worker";
71
+
72
+
73
+
74
+ public static final String FORM_NAME = JSP_TOGO_PERIX+"Form";
75
+ public static final String packageLowerCase = "!REPLACE_STYLE!";
76
+
77
+ public static final String packageUpperCase = packageLowerCase.toUpperCase();
78
+
79
+
80
+ public static StatusMessageBean initStatusMessageBean(HttpSession session,Descriptions [] descriptions , String extra){
81
+
82
+ StatusMessageBean messageBean = new StatusMessageBean();
83
+ for (int i = 0; i < descriptions.length; i++) {
84
+ messageBean.addStep((i==0?extra:"")+descriptions[i].getLabel());
85
+ }
86
+ StringBuffer messageBuffer = new StringBuffer();
87
+ messageBean.setMessageBuffer(messageBuffer);
88
+ session.setAttribute(CommonProperty.IntermediaMessage, messageBuffer);
89
+
90
+ return messageBean;
91
+ }
92
+
93
+ public static StatusMessageBean initStatusMessageBean(HttpSession session, String [] descriptions, String extra) {
94
+ StatusMessageBean messageBean = new StatusMessageBean();
95
+ for (int i = 0; i < descriptions.length; i++) {
96
+ messageBean.addStep((i == 0 ? extra : "") + descriptions[i]);
97
+ }
98
+
99
+ StringBuffer messageBuffer = new StringBuffer();
100
+ messageBean.setMessageBuffer(messageBuffer);
101
+ session.setAttribute(CommonProperty.IntermediaMessage, messageBuffer);
102
+
103
+ return messageBean;
104
+ }
105
+ public static void main(String[] x) {
106
+ //System.out.println(StringEscapeUtils.escapeHtml( "NETWORKPROGRAM"));
107
+ }
108
+ @ServicerType("com.l5m.!REPLACE_STYLE!.engine.servicer.!REPLACE_ME_FILE!ServicerImpl")
109
+ private !REPLACE_ME_FILE!ServicerImpl servicer;
110
+ protected String btnClicked;
111
+
112
+ protected boolean needForwordToJsp = true;
113
+
114
+ protected NavigationBean navigationBean;
115
+
116
+ private boolean showDialog = false;
117
+
118
+
119
+ public !REPLACE_ME_FILE!Worker() {
120
+ this.navigationBean = new NavigationBean();
121
+ this.navigationBean.setJSPGoTo(JSP_TOGO);
122
+
123
+
124
+ }
125
+
126
+ protected void bindParams(HttpServletRequest request) {
127
+ this.btnClicked = (super.getParamValueString(AppConfig.getProperty("butOption"), "N/A"));
128
+ String refresh = request.getParameter(REFRESH_TYPE);
129
+ this.needForwordToJsp = !(refresh != null && refresh.equals(JSON_REFRESH_TYPE));
130
+ if (this.btnClicked.equals(PROGRESS_PAGE_POSTBACK) || (refresh != null && refresh.equals(JSON_REFRESH_TYPE))) {
131
+ return;
132
+ }
133
+
134
+ BaseServicerParaBean baseServicerParameterBean = this.servicer.getBaseServicerParameterBean();
135
+ try {
136
+ baseServicerParameterBean.setPanelIndex(Integer.parseInt(request.getParameter("panelIndex")));
137
+ } catch (Exception e) {
138
+ baseServicerParameterBean.setPanelIndex(0);
139
+ }
140
+ baseServicerParameterBean.setSelectedTab(StringEscapeUtils.unescapeHtml( super.getParamValueString("accordionTestTop:selected", "SOURCE" )));
141
+ this.servicer.getBaseServicerParameterBean().getTopBarStateBean().setId("TopBar").parseOnlyStartStatus(request);
142
+
143
+ // use method from GenerateTagUtil to parse tags
144
+
145
+
146
+
147
+ }
148
+ private void bindParamsDisplayAndSort(HttpServletRequest request) {
149
+ this.servicer.getBaseServicerParameterBean().bindTopBart(request, "TopBar");
150
+ }
151
+
152
+
153
+
154
+
155
+ private void changeDecimalAction() {
156
+ this.setRefreshZones("result");
157
+ this.servicer.setReportDecimalControlList(TopBar2StateBean.parseOnlyDecimal(this.getRequest(), "TopBar" ).getValue());
158
+
159
+ }
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ private void changePaginatorAction() {
170
+ PaginatorStateBean stateBean = this.servicer.getPaginatorStateBean();
171
+ stateBean.parse(this.getRequest());
172
+ this.servicer.handlePaginator(this.servicer.getPanelIndex());
173
+ this.setRefreshZones("panelZone,result");
174
+
175
+ }
176
+
177
+
178
+
179
+
180
+ private void changePanelAction() {
181
+ this.setRefreshZones("result,topNavigationZone,sortDialogZone,filterDialogZone,displayDialogZone");
182
+
183
+ }
184
+
185
+
186
+
187
+
188
+
189
+ public void changeSortDisplayModeAction() {
190
+ String sortBy = this.servicer.getBaseServicerParameterBean().getSelectedSortBy();
191
+ this.bindParamsDisplayAndSort(this.getRequest());
192
+
193
+ Set<String> displayBy = this.servicer.getBaseServicerParameterBean().getSelectedDisplayBy();
194
+
195
+ if(!this.servicer.getBaseServicerParameterBean().getSelectedDisplayBy().equals( displayBy)){
196
+ this.servicer.updateDisplay();
197
+ }
198
+ if(!this.servicer.getBaseServicerParameterBean().getSelectedSortBy().equals(sortBy) ){
199
+ this.servicer.sort();
200
+ }
201
+
202
+ this.setRefreshZones("result,sourcePanelZone");
203
+
204
+ }
205
+
206
+
207
+
208
+ /* private String baseDir(String subLevel) {
209
+ return getCurvePath() + "" + this.servicer.getUserId() + "/" + navigationBean.getProgramKey() + "/" + subLevel+"/";
210
+ }
211
+
212
+
213
+ */
214
+
215
+
216
+
217
+
218
+
219
+ public void changeTimeAction() {
220
+ this.servicer.getBaseServicerParameterBean().changeTime(this.getRequest());
221
+ this.setRefreshZones("sourcePanelZone");
222
+
223
+ if(this.servicer.isDisplayStage()){
224
+ this.clearResultAction();
225
+ }
226
+ }
227
+
228
+
229
+
230
+ public void clearResultAction() {
231
+ this.servicer.clearCache();
232
+ this.servicer.getBaseServicerParameterBean().setPanelIndex(PANEL.Help.panelIndex());
233
+ this.servicer.getBaseServicerParameterBean().setDisplayStage(false);
234
+ this.setRefreshZones("result,sourcePanelZone");
235
+ }
236
+
237
+ @SuppressWarnings("unchecked")
238
+ public void displayRefreshAction() {
239
+ MultipleSelectStateBean messuare = new MultipleSelectStateBean();
240
+ messuare.setSelectedValues(new HashSet<String>());
241
+ messuare.setId("multipleColumnsController");
242
+ messuare.parse(this.getRequest());
243
+ if(servicer.getColumnsMap() != null){
244
+ boolean[] displayControllerMeasurement = new boolean[servicer.getColumnsMap().size()];
245
+ if (messuare.getSelectedValues() != null) {
246
+ displayControllerMeasurement = messuare.getSelectedValueBoolean(servicer.getColumnsMap());
247
+ this.servicer.setDisplayController(displayControllerMeasurement);
248
+ }
249
+ this.servicer.setSelectedColumns(messuare.getSelectedValues() == null ? (new HashSet<String>()) : (HashSet<String>) messuare.getSelectedValues());
250
+ }
251
+
252
+
253
+ this.servicer.updateDisplay();
254
+ this.setRefreshZones("result");
255
+ }
256
+
257
+
258
+
259
+ public void exportExcelAction() {
260
+ this.needForwordToJsp = false;
261
+ @SuppressWarnings("unused")
262
+ ExportInformationBean informationBean = this.getExportInformationBean();
263
+
264
+ }
265
+
266
+ public void exportPDFAction() {
267
+ this.needForwordToJsp = false;
268
+ }
269
+
270
+ public void filterRefreshAction() {
271
+ this.servicer.processFilter();
272
+ this.setRefreshZones("result");
273
+ //
274
+ }
275
+
276
+
277
+
278
+ /**
279
+ * @return the aPP_NAME
280
+ */
281
+ public String getAPP_NAME() {
282
+ @SuppressWarnings("unchecked")
283
+ Map<String, NavigationItemBean> navBarAccessMap = (Map<String, NavigationItemBean>) this.getRequest().getSession().getAttribute("navAccessBean");
284
+ String displayName = null;
285
+ try {
286
+ displayName = navBarAccessMap.get(this.navigationBean.getProgramKey()).getDisplayName();
287
+ } catch (Exception e) {
288
+ }
289
+ if (displayName != null)
290
+ return displayName;
291
+ return "";
292
+ }
293
+
294
+
295
+
296
+ /**
297
+ * @return the btnClicked
298
+ */
299
+ public String getBtnClicked() {
300
+ return btnClicked;
301
+ }
302
+
303
+
304
+
305
+
306
+ public int getDataAvailability() {
307
+ return PANEL.DataAvailability.panelIndex();
308
+ }
309
+
310
+
311
+
312
+ @SuppressWarnings({ "unchecked"})
313
+ private ExportInformationBean getExportInformationBean(){
314
+ ExportInformationBean informationBean = null;
315
+ try {
316
+ informationBean = new ExportInformationBean(this.navigationBean, (HashMap) this.getSession().getAttribute(UserCompanyWorker.NAV_ACCESS_BEAN), DataUtil.getCompanyName(this.servicer.getDbHandler(), this.servicer.getCompanyId()), DataUtil.getUserFullName(this.servicer.getDbHandler(), this.servicer.getUserId()));
317
+ }
318
+ catch (Exception e) {
319
+ e.printStackTrace();
320
+ }
321
+ return informationBean;
322
+ }
323
+
324
+ /**
325
+ * @return the fORM_NAME
326
+ */
327
+ public String getFORM_NAME() {
328
+ return FORM_NAME;
329
+ }
330
+
331
+ public int getHelp() {
332
+ return PANEL.Help.panelIndex();
333
+ }
334
+
335
+
336
+
337
+ /**
338
+ * @return the jSP_TOGO
339
+ */
340
+ public String getJSP_TOGO() {
341
+ return JSP_TOGO;
342
+ }
343
+
344
+ public String getJspGoto() {
345
+ return JSP_TOGO;
346
+ }
347
+
348
+ /**
349
+ * @return the navigationBean
350
+ */
351
+ public NavigationBean getNavigationBean() {
352
+ return navigationBean;
353
+ }
354
+
355
+ public String getPackageLowerCase() {
356
+ return packageLowerCase;
357
+ }
358
+
359
+ public String getPackageUpperCase() {
360
+ return packageUpperCase;
361
+ }
362
+
363
+ public PANEL[] getPANEL(){
364
+ return PANEL.values();
365
+ }
366
+
367
+
368
+ public String getRenderHTML() {
369
+ if(! hasData()) return "";
370
+ try{
371
+ }catch(Exception e){
372
+ e.printStackTrace();
373
+ }
374
+ return "";
375
+
376
+ }
377
+
378
+
379
+
380
+ public String getRenderPaginatorHTML() {
381
+ if(!hasData()) return "";
382
+ Paginator2Tag paginatorTag = GenerateTagUtil.getPaginator2Tag("PaginatorStateBeanTag", "pageAction.changePaginator();", this.servicer.getPaginatorStateBean());
383
+ paginatorTag.setStyle(packageLowerCase);
384
+ try {
385
+ return paginatorTag.renderHTML();
386
+ } catch (Exception e) {
387
+ e.printStackTrace();
388
+ }
389
+ return "";
390
+ }
391
+
392
+ public !REPLACE_ME_FILE!ServicerImpl getServicer() {
393
+ return servicer;
394
+ }
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+ public String getUrl() {
403
+ String workerParamName = AppConfig.getProperty("requestAction");
404
+ String jspSrcParamName = AppConfig.getProperty("srcPage");
405
+ String companyId = this.servicer.getCompanyId();
406
+ StringBuilder url = new StringBuilder();
407
+ //url.append(this.getRequest().getContextPath()+"/servlet/L5MOnline/").append(AppConfig.getProperty("appL5MOnline")).append("?");
408
+ url.append(workerParamName).append("=").append(this.getRequest().getParameter(workerParamName)).append("&");
409
+ url.append(jspSrcParamName).append("=" + JSP_TOGO + "&companyid=").append(companyId);
410
+ url.append("&1stnavbar=").append(this.getRequest().getParameter("1stnavbar"));
411
+ url.append("&").append(REFRESH_TYPE).append("=").append(JSON_REFRESH_TYPE);
412
+
413
+ return url.toString();
414
+ }
415
+
416
+ /**
417
+ * @return the wORKER_NAME
418
+ */
419
+ public String getWORKER_NAME() {
420
+ return WORKER_NAME;
421
+ }
422
+
423
+ public boolean hasData(){
424
+ final int panelIndex = this.servicer.getPanelIndex();
425
+ if(panelIndex == PANEL.Help.panelIndex() || panelIndex == PANEL.DataAvailability.panelIndex()){
426
+ return false;
427
+ }
428
+ return true;
429
+ }
430
+
431
+ protected void initWorker() {
432
+ this.servicer.getBaseServicerParameterBean().setPanelIndex(PANEL.Help.panelIndex());
433
+
434
+ }
435
+
436
+ public boolean isShowDialog() {
437
+ return showDialog;
438
+ }
439
+
440
+ private void popupDialogAction(String dialog) {
441
+ this.showDialog = true;
442
+ this.setRefreshZones(dialog+"Zone,"+dialog+"BottomZone");
443
+ }
444
+
445
+
446
+
447
+
448
+ /**
449
+ * this method only dispatch btnClicked action, don't write another logic in this method.
450
+ * all method should be use Action as suffix w/o or with btnClick as parameter as neccersy.
451
+ * @param btnClicked
452
+ */
453
+ public void processButtonClickedAction(String btnClicked) {
454
+ if (btnClicked.equals(SUBMIT)) {
455
+ this.submitAction();
456
+ } else if (btnClicked.equals(EXPORT_EXCEL)) {
457
+ this.exportExcelAction();
458
+ }
459
+ else if (btnClicked.equals(EXPORT_PDF)) {
460
+ this.exportPDFAction();
461
+ } else if (btnClicked.equals(DISPLAY_REFRESH)) {
462
+ this.displayRefreshAction();
463
+ } else if (btnClicked.equals(SORT_RERESH)) {
464
+ this.sortRefreshAction();
465
+ } else if (btnClicked.equals(FILTER_REFRESH)) {
466
+ this.filterRefreshAction();
467
+ } else if (btnClicked.equals("changeSortDisplayMode")) {
468
+ this.changeSortDisplayModeAction();
469
+ } else if (btnClicked.equals("clearResult")) {
470
+ this.clearResultAction();
471
+ } else if (btnClicked.equals("changeTime")) {
472
+ this.changeTimeAction();
473
+ } else if (btnClicked.equals("changeDecimal")) {
474
+ this.changeDecimalAction();
475
+ } else if ("resetDialog".equals(btnClicked)) {
476
+ this.resetDialogAction();
477
+ } else if ("changePanel".equals(btnClicked)) {
478
+ this.changePanelAction();
479
+ } else if ("changePaginator".equals(btnClicked)) {
480
+ this.changePaginatorAction();
481
+ }
482
+ else if(btnClicked.endsWith("Dialog")){
483
+ this.popupDialogAction(btnClicked);
484
+ }
485
+ else {
486
+
487
+ }
488
+
489
+ }
490
+
491
+ @Override
492
+ public void processRequest() {
493
+
494
+ this.getResponse().setContentType("text/html");
495
+ this.getRequest().setAttribute(AA_REFRESH_ZONES_NAME, getRequest().getParameter(AA_REFRESH_ZONES_NAME));
496
+ this.getSession().setAttribute(CommonProperty.JobDoneIndicator, "N");
497
+ this.getSession().setAttribute(CommonProperty.EndJspPageName, JSP_TOGO_PERIX);
498
+ this.needForwordToJsp = true;
499
+
500
+ if (isFromOtherPages(JSP_TOGO)) {
501
+ this.initWorker();
502
+ } else {
503
+ this.bindParams(getRequest());
504
+ if (this.btnClicked != null && this.btnClicked != "" && (!this.btnClicked.equals(""))) {
505
+ this.processButtonClickedAction(this.btnClicked);
506
+ }
507
+ }
508
+ if (this.needForwordToJsp && (!getResponse().isCommitted())) {
509
+ try {
510
+ this.getSession().setAttribute(CommonProperty.JobDoneIndicator, "Y");
511
+ forwardToJsp(JSP_TOGO);
512
+ } catch (IOException e) {
513
+ e.printStackTrace();
514
+ AppLog.error(this + ":Exception " + e.getMessage());
515
+ } catch (ServletException e) {
516
+ e.printStackTrace();
517
+ AppLog.error(this + ":Exception " + e.getMessage());
518
+ }
519
+ }
520
+
521
+
522
+ }
523
+
524
+ private void resetDialogAction() {
525
+ this.setRefreshZones("sourcePanelZone,topNavigationZone,sortDialogZone,filterDialogZone,displayDialogZone");
526
+ }
527
+
528
+ public void setRefreshZones(String zones) {
529
+ this.getRequest().setAttribute(AA_REFRESH_ZONES_NAME, zones);
530
+ }
531
+
532
+
533
+ public void setServicer(!REPLACE_ME_FILE!ServicerImpl servicer) {
534
+ this.servicer = servicer;
535
+ }
536
+
537
+
538
+
539
+ public void setShowDialog(boolean showDialog) {
540
+ this.showDialog = showDialog;
541
+ }
542
+
543
+
544
+
545
+ public void sortRefreshAction() {
546
+
547
+ try{
548
+ SortingKeysModuleStateBean sortingKeysModuleStateBean = parseModuleStateBean(this.servicer.getSortingKeysModuleStateBean(),
549
+ this.servicer.getSortingKeysModuleStateBean().getId(), this .getRequest());
550
+ this.servicer.setSortingKeysModuleStateBean(sortingKeysModuleStateBean);
551
+ }catch(Exception e){
552
+ }
553
+
554
+ this.servicer.sort();
555
+ this.setRefreshZones("result");
556
+
557
+ }
558
+
559
+ public void submitAction() {
560
+ this.servicer.getBaseServicerParameterBean().changeTime(this.getRequest());
561
+
562
+
563
+ StatusMessageBean messageBean = initStatusMessageBean( this.getSession(), Descriptions.values(),"");
564
+ this.servicer.getBaseServicerParameterBean().setSelectionPanelStatusOpen(false);
565
+ this.servicer.getBaseServicerParameterBean().setMessageBean(messageBean);
566
+
567
+ messageBean.reset();
568
+ this.getAppStatusServicer().setStatusMessageBean(messageBean);
569
+ messageBean.setCurrentStep(Descriptions.Initializing.ordinal());
570
+
571
+ this.servicer.clearCache();
572
+ this.servicer.getBaseServicerParameterBean().setPanelIndex(0);
573
+
574
+ messageBean.setCurrentStep(Descriptions.RetrievingData.ordinal());
575
+ try {
576
+
577
+ this.servicer.retrieveData();
578
+ } catch (Exception e) {
579
+ e.printStackTrace();
580
+ }
581
+ messageBean.setCurrentStep(Descriptions.CreatingReport.ordinal());
582
+
583
+
584
+ this.servicer.sort();
585
+ this.servicer.updateDisplay();
586
+
587
+
588
+ messageBean.setCurrentStep(Descriptions.Finalize.ordinal());
589
+ this.servicer.getBaseServicerParameterBean().setDisplayStage(true);
590
+ this.servicer.getBaseServicerParameterBean().setSelectionPanelStatusOpen(false);
591
+ this.setRefreshZones("");
592
+ messageBean.setStepCompleted(Descriptions.Finalize.ordinal() );
593
+ this.getAppStatusServicer().setCompleted(true);
594
+
595
+ }
596
+
597
+
598
+
599
+
600
+ public String[] getActions() {
601
+ return new String[] {
602
+ "",
603
+ "pageAction.showDialog('filterDialog')", // filter
604
+ "", // search
605
+ "", // highlight
606
+ "pageAction.showDialog('sortDialog')", // sort
607
+ "pageAction.showDialog('displayDialog')", // display
608
+ "pageAction.clickButton('changeDecimal')", // decimal
609
+ "pageAction.clickExportButton('" + ActionConstants.EXPORT_EXCEL + "')", // excel
610
+ "pageAction.clickExportButton('" + ActionConstants.EXPORT_PDF + "')", // pdf
611
+ "pageAction.showDialog('optionDialog')", // options
612
+ "pageAction.showDialogDirectly('emailDialog')", // email
613
+ "pageAction.clickButton('changeSortDisplayMode')", // inc
614
+
615
+ };
616
+ }
617
+ public TopBarIcon[] getTopBarIcons() {
618
+ return new TopBarIcon[] {
619
+ TopBarIcon.Start,
620
+ TopBarIcon.Filter,
621
+ TopBarIcon.Search,
622
+ TopBarIcon.Highlight,
623
+ TopBarIcon.Sort,
624
+ TopBarIcon.Display,
625
+ TopBarIcon.Decimal,
626
+ TopBarIcon.Excel,
627
+ TopBarIcon.PDF,
628
+ TopBarIcon.Options,
629
+ TopBarIcon.Email,
630
+ TopBarIcon.IncIcon ,
631
+ };
632
+
633
+ }
634
+
635
+ public IconStatus[] getIconsStatus() {
636
+ final boolean hasData = this.hasData();
637
+ return new IconStatus[] {
638
+ this.servicer.getBaseServicerParameterBean().isSelectionPanelStatusOpen() ? IconStatus.open : IconStatus.close,
639
+ hasData? IconStatus.active :IconStatus.inactive, // filter
640
+ IconStatus.inactive, // search
641
+ IconStatus.inactive, // highlight
642
+ hasData? IconStatus.active :IconStatus.inactive, // sort
643
+ hasData? IconStatus.active :IconStatus.inactive, // display
644
+ hasData? IconStatus.active :IconStatus.inactive, // decimal
645
+ hasData? IconStatus.active :IconStatus.inactive, // excel
646
+ IconStatus.inactive, // pdf
647
+ IconStatus.inactive, // options
648
+ hasData? IconStatus.active :IconStatus.inactive, // email
649
+ IconStatus.active, // inc
650
+ };
651
+
652
+ }
653
+ }