1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.container;
17
18 import java.util.ArrayList;
19 import java.util.Collection;
20 import java.util.HashMap;
21 import java.util.List;
22 import java.util.Map;
23 import java.util.regex.Matcher;
24 import java.util.regex.Pattern;
25
26 import org.apache.commons.lang.StringUtils;
27 import org.kuali.rice.krad.datadictionary.parse.BeanTag;
28 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
29 import org.kuali.rice.krad.datadictionary.parse.BeanTags;
30 import org.kuali.rice.krad.uif.UifConstants;
31 import org.kuali.rice.krad.uif.component.BindingInfo;
32 import org.kuali.rice.krad.uif.component.Component;
33 import org.kuali.rice.krad.uif.component.DataBinding;
34 import org.kuali.rice.krad.uif.control.CheckboxControl;
35 import org.kuali.rice.krad.uif.control.Control;
36 import org.kuali.rice.krad.uif.control.SelectControl;
37 import org.kuali.rice.krad.uif.control.TextControl;
38 import org.kuali.rice.krad.uif.element.Action;
39 import org.kuali.rice.krad.uif.element.Image;
40 import org.kuali.rice.krad.uif.element.Label;
41 import org.kuali.rice.krad.uif.element.Link;
42 import org.kuali.rice.krad.uif.element.Message;
43 import org.kuali.rice.krad.uif.field.DataField;
44 import org.kuali.rice.krad.uif.field.Field;
45 import org.kuali.rice.krad.uif.field.FieldGroup;
46 import org.kuali.rice.krad.uif.field.InputField;
47 import org.kuali.rice.krad.uif.util.ComponentUtils;
48 import org.kuali.rice.krad.uif.util.ObjectPropertyUtils;
49 import org.kuali.rice.krad.uif.view.ExpressionEvaluator;
50 import org.kuali.rice.krad.uif.view.View;
51 import org.kuali.rice.krad.uif.widget.Inquiry;
52 import org.kuali.rice.krad.uif.widget.RichTable;
53 import org.kuali.rice.krad.uif.widget.Tooltip;
54 import org.kuali.rice.krad.util.KRADConstants;
55 import org.kuali.rice.krad.util.KRADUtils;
56 import org.kuali.rice.krad.web.form.UifFormBase;
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81 @BeanTags({@BeanTag(name = "lightTableGroup-bean", parent = "Uif-LightTableGroup"),
82 @BeanTag(name = "lightTableSection-bean", parent = "Uif-LightTableSection"),
83 @BeanTag(name = "lightTableSubSection-bean", parent = "Uif-LightTableSubSection")})
84 public class LightTable extends Group implements DataBinding {
85 private static final long serialVersionUID = -8930885219866835711L;
86
87 private static final String VALUE_TOKEN = "@v@";
88 private static final String EXPRESSION_TOKEN = "@e@";
89 private static final String RENDER = "render";
90 private static final String ID_TOKEN = "@id@";
91 private static final String A_TOKEN = "@";
92 private static final String ROW_CLASS = "@rowClass@";
93 private static final String SORT_VALUE = "@sortVal";
94 private static final String SEPARATOR = "@@@";
95
96 private String propertyName;
97 private BindingInfo bindingInfo;
98 private List<Label> headerLabels;
99 private RichTable richTable;
100 private Map<String, String> conditionalRowCssClasses;
101
102 private Map<String, String> expressionConversionMap;
103 private List<String> initialComponentIds;
104 private Map<String, String> renderIdExpressionMap;
105 private boolean emptyTable;
106 private String currentColumnValue;
107
108
109
110
111 public LightTable() {
112 expressionConversionMap = new HashMap<String, String>();
113 initialComponentIds = new ArrayList<String>();
114 renderIdExpressionMap = new HashMap<String, String>();
115 }
116
117
118
119
120
121 @Override
122 public void performInitialization(View view, Object model) {
123 super.performInitialization(view, model);
124 richTable.setForceLocalJsonData(true);
125
126
127 if (bindingInfo != null) {
128 bindingInfo.setDefaults(view, getPropertyName());
129 }
130
131
132 for (Component item : this.getItems()) {
133 initialComponentIds.add(item.getId());
134
135
136 if (item instanceof DataField) {
137 ((DataField) item).setForcedValue(VALUE_TOKEN + item.getId() + VALUE_TOKEN);
138 }
139
140
141 expressionConversionMap = buildExpressionMap(item, expressionConversionMap);
142 }
143 }
144
145
146
147
148
149
150
151
152
153
154 protected Map<String, String> buildExpressionMap(Component item, Map<String, String> expressionMap) {
155 if (item == null) {
156 return expressionMap;
157 }
158
159 List<String> toRemove = new ArrayList<String>();
160
161 if (item.getExpressionGraph() != null && !item.getExpressionGraph().isEmpty()) {
162 for (String name : item.getExpressionGraph().keySet()) {
163 processExpression(name, item, expressionMap, toRemove);
164 }
165 }
166
167
168 item.setId(ID_TOKEN + item.getId() + ID_TOKEN);
169
170 if (item instanceof Group) {
171 ((Group) item).getLayoutManager().setId(ID_TOKEN + ((Group) item).getLayoutManager().getId() + ID_TOKEN);
172 }
173
174 expressionMap = addChildExpressions(item.getComponentsForLifecycle(), expressionMap);
175
176 for (String name : toRemove) {
177 item.getExpressionGraph().remove(name);
178 }
179
180 return expressionMap;
181 }
182
183
184
185
186
187
188
189
190
191
192 public void processExpression(String name, Component item, Map<String, String> expressionMap,
193 List<String> toRemove) {
194 Class<?> clazz = ObjectPropertyUtils.getPropertyType(item, name);
195 if (clazz == null) {
196 return;
197 }
198
199 if (clazz.isAssignableFrom(String.class)) {
200
201 expressionMap.put(name + SEPARATOR + item.getId(), item.getExpressionGraph().get(name));
202 toRemove.add(name);
203 ObjectPropertyUtils.setPropertyValue(item, name,
204 EXPRESSION_TOKEN + name + SEPARATOR + item.getId() + EXPRESSION_TOKEN);
205
206 } else if (name.endsWith(RENDER) && clazz.isAssignableFrom(boolean.class)) {
207
208 Component renderComponent = item;
209
210
211 if (!name.equals(RENDER)) {
212 renderComponent = ObjectPropertyUtils.getPropertyValue(item, StringUtils.removeEnd(name, ".render"));
213 }
214
215
216 renderIdExpressionMap.put(renderComponent.getId(), item.getExpressionGraph().get(name));
217 toRemove.add(name);
218
219 String renderMarker = A_TOKEN + RENDER + A_TOKEN + renderComponent.getId() + A_TOKEN;
220
221
222 String pre = renderComponent.getPreRenderContent() == null ? "" : renderComponent.getPreRenderContent();
223 renderComponent.setPreRenderContent(renderMarker + pre);
224
225
226 String post = renderComponent.getPostRenderContent() == null ? "" : renderComponent.getPostRenderContent();
227 renderComponent.setPostRenderContent(post + renderMarker);
228
229
230 ObjectPropertyUtils.setPropertyValue(item, name, true);
231 }
232 }
233
234
235
236
237
238
239
240
241 protected Map<String, String> addChildExpressions(List<? extends Component> components,
242 Map<String, String> expressionMap) {
243 for (Component comp : components) {
244 if (comp != null && (comp instanceof Action
245 || comp instanceof Image
246 || comp instanceof Message
247 || comp instanceof Link
248 || comp instanceof Inquiry
249 || comp instanceof Group
250 || comp instanceof Tooltip
251 || comp instanceof InputField
252 || comp instanceof CheckboxControl
253 || comp instanceof TextControl
254 || comp instanceof SelectControl)) {
255 expressionMap = buildExpressionMap(comp, expressionMap);
256 }
257 }
258
259 return expressionMap;
260 }
261
262
263
264
265 @Override
266 public void performFinalize(View view, Object model, Component parent) {
267 super.performFinalize(view, model, parent);
268
269 headerLabels = new ArrayList<Label>();
270 for (Component item : this.getItems()) {
271
272 if (item instanceof Field) {
273 headerLabels.add(ComponentUtils.copy(((Field) item).getFieldLabel()));
274 ((Field) item).getFieldLabel().setRender(false);
275 } else {
276 headerLabels.add(null);
277 }
278
279 if (item instanceof FieldGroup) {
280 ((FieldGroup) item).getGroup().setValidationMessages(null);
281
282 }
283
284 if (item instanceof DataField) {
285 ((DataField) item).getBindingInfo().setBindByNamePrefix(this.getBindingInfo().getBindingPath() + "[0]");
286 }
287 }
288
289 Object collectionValue = ObjectPropertyUtils.getPropertyValue(model, bindingInfo.getBindingPath());
290
291
292 if (collectionValue == null || !(collectionValue instanceof Collection) ||
293 ((Collection<?>) collectionValue).isEmpty()) {
294 emptyTable = true;
295 }
296 }
297
298
299
300
301 @Override
302 public List<Component> getComponentsForLifecycle() {
303 List<Component> components = super.getComponentsForLifecycle();
304
305 components.add(richTable);
306 return components;
307 }
308
309
310
311
312
313
314
315
316
317
318 public void buildRows(View view, String rowTemplate, UifFormBase model) {
319 if (StringUtils.isBlank(rowTemplate)) {
320 return;
321 }
322
323 rowTemplate = StringUtils.removeEnd(rowTemplate, ",");
324 rowTemplate = rowTemplate.replace("\n", "");
325 rowTemplate = rowTemplate.replace("\r", "");
326
327 StringBuffer rows = new StringBuffer();
328 List<Object> collectionObjects = ObjectPropertyUtils.getPropertyValue(model, bindingInfo.getBindingPath());
329
330
331 rowTemplate = rowTemplate.replace("checked=\"checked\"", "");
332
333
334 Pattern idPattern = Pattern.compile(ID_TOKEN + "(.*?)" + ID_TOKEN);
335 Pattern expressionPattern = Pattern.compile(EXPRESSION_TOKEN + "(.*?)" + EXPRESSION_TOKEN);
336
337 ExpressionEvaluator expressionEvaluator = view.getViewHelperService().getExpressionEvaluator();
338 expressionEvaluator.initializeEvaluationContext(model);
339
340 int lineIndex = 0;
341 for (Object obj : collectionObjects) {
342
343 String row = idPattern.matcher(rowTemplate).replaceAll("$1" + UifConstants.IdSuffixes.LINE + lineIndex);
344
345
346 Map<String, Object> expandedContext = new HashMap<String, Object>();
347 expandedContext.put(UifConstants.ContextVariableNames.LINE, obj);
348 expandedContext.put(UifConstants.ContextVariableNames.INDEX, lineIndex);
349 expandedContext.put(UifConstants.ContextVariableNames.VIEW, view);
350
351 currentColumnValue = "";
352
353 int itemIndex = 0;
354 for (Component item : this.getItems()) {
355
356 String originalId = initialComponentIds.get(itemIndex);
357
358
359 row = handleDataFieldInRow(item, obj, row, lineIndex, originalId);
360
361
362 row = handleInputFieldInRow(item, obj, row, lineIndex, originalId);
363
364
365 if (item.getContext() != null) {
366 expandedContext.putAll(item.getContext());
367 }
368
369
370 row = evaluateAndReplaceExpressionValues(row, lineIndex, model, expandedContext, expressionPattern,
371 expressionEvaluator);
372
373 if (currentColumnValue == null) {
374 currentColumnValue = "";
375 }
376
377 row = row.replace(SORT_VALUE + itemIndex + A_TOKEN, currentColumnValue);
378
379 itemIndex++;
380 }
381
382
383 boolean isOdd = lineIndex % 2 == 0;
384 String rowCss = KRADUtils.generateRowCssClassString(conditionalRowCssClasses, lineIndex, isOdd,
385 expandedContext, expressionEvaluator);
386
387 row = row.replace("\"", "\\\"");
388 row = row.replace(ROW_CLASS, rowCss);
389 row = "{" + row + "},";
390
391
392 row = evaluateRenderExpressions(row, lineIndex, model, expandedContext, expressionEvaluator);
393
394
395 rows.append(row);
396 lineIndex++;
397 }
398
399 StringBuffer tableToolsColumnOptions = new StringBuffer("[");
400 for (int index = 0; index < this.getItems().size(); index++) {
401 String colOptions = richTable.constructTableColumnOptions(index, true, false, String.class, null);
402 tableToolsColumnOptions.append(colOptions + " , ");
403 }
404
405 String aoColumnDefs = StringUtils.removeEnd(tableToolsColumnOptions.toString(), " , ") + "]";
406 Map<String, String> rtTemplateOptions = richTable.getTemplateOptions();
407
408 if (rtTemplateOptions == null) {
409 richTable.setTemplateOptions(rtTemplateOptions = new HashMap<String, String>());
410 }
411
412 rtTemplateOptions.put(UifConstants.TableToolsKeys.AO_COLUMN_DEFS, aoColumnDefs);
413
414
415 String aaData = StringUtils.removeEnd(rows.toString(), ",");
416 aaData = "[" + aaData + "]";
417 aaData = aaData.replace(KRADConstants.QUOTE_PLACEHOLDER, "\"");
418
419
420 rtTemplateOptions.put(UifConstants.TableToolsKeys.AA_DATA, aaData);
421
422
423 rtTemplateOptions.put(UifConstants.TableToolsKeys.DEFER_RENDER,
424 UifConstants.TableToolsValues.TRUE);
425 }
426
427
428
429
430
431
432
433
434
435
436
437
438 protected String evaluateAndReplaceExpressionValues(String row, int index, Object model,
439 Map<String, Object> expandedContext, Pattern expressionPattern, ExpressionEvaluator expressionEvaluator) {
440
441 Matcher matcher = expressionPattern.matcher(row);
442
443 while (matcher.find()) {
444 String matchingGroup = matcher.group(1);
445 String expression = expressionConversionMap.get(matchingGroup);
446
447
448 expression = expression.replace(UifConstants.LINE_PATH_BIND_ADJUST_PREFIX,
449 this.getBindingInfo().getBindingPath() + "[" + index + "].");
450
451
452 Object value = expressionEvaluator.evaluateExpressionTemplate(expandedContext, expression);
453
454 if (value != null) {
455 row = row.replace(matcher.group(), value.toString());
456 } else {
457 row = row.replace(matcher.group(), "");
458 }
459 }
460
461 return row;
462 }
463
464
465
466
467
468
469
470
471
472
473
474 protected String evaluateRenderExpressions(String row, int index, Object model, Map<String, Object> expandedContext,
475 ExpressionEvaluator expressionEvaluator) {
476 for (String id : renderIdExpressionMap.keySet()) {
477 String expression = renderIdExpressionMap.get(id);
478
479
480 expression = expression.replace(UifConstants.LINE_PATH_BIND_ADJUST_PREFIX,
481 this.getBindingInfo().getBindingPath() + "[" + index + "].");
482
483
484 Object value = expressionEvaluator.evaluateExpressionTemplate(expandedContext, expression);
485
486 String wrap = A_TOKEN + RENDER + A_TOKEN + id + A_TOKEN;
487
488 if (value != null && value instanceof String && Boolean.parseBoolean((String) value) == false) {
489
490 row = row.replaceAll(wrap + "(.|\\s)*?" + wrap, "");
491 } else {
492
493 row = row.replaceAll(wrap, "");
494 }
495 }
496
497 return row;
498 }
499
500
501
502
503
504
505
506
507
508
509
510 protected String handleDataFieldInRow(Component item, Object obj, String row, int index, String originalId) {
511 if (!(item instanceof DataField)) {
512 return row;
513 }
514
515 Object currentValue = ObjectPropertyUtils.getPropertyValue(obj, ((DataField) item).getPropertyName());
516
517 if (currentValue == null) {
518 currentValue = "";
519 }
520
521
522 row = row.replaceAll(VALUE_TOKEN + originalId + VALUE_TOKEN, currentValue.toString());
523 currentColumnValue = currentValue.toString();
524
525 if (((DataField) item).getInquiry() != null
526 && ((DataField) item).getInquiry().getInquiryParameters() != null
527 && ((DataField) item).getInquiry().getInquiryLink() != null) {
528
529 String inquiryLinkId = ((DataField) item).getInquiry().getInquiryLink().getBaseId().replace(ID_TOKEN, "")
530 + UifConstants.IdSuffixes.LINE
531 + index;
532
533
534
535 for (String key : ((DataField) item).getInquiry().getInquiryParameters().keySet()) {
536 String name = ((DataField) item).getInquiry().getInquiryParameters().get(key);
537
538
539 key = key.replace(((DataField) item).getBindingInfo().getBindByNamePrefix() + ".", "");
540
541 if (ObjectPropertyUtils.isReadableProperty(obj, key)) {
542 String value = ObjectPropertyUtils.getPropertyValue(obj, key);
543 row = row.replaceFirst("(" + inquiryLinkId + "(.|\\s)*?" + name + ")=.*?([&|\"])",
544 "$1=" + value + "$3");
545 }
546
547 }
548 }
549
550 return row;
551 }
552
553
554
555
556
557
558
559
560
561
562
563 protected String handleInputFieldInRow(Component item, Object obj, String row, int index, String originalId) {
564 if (!(item instanceof InputField) || ((InputField) item).getControl() == null) {
565 return row;
566 }
567
568 Control control = ((InputField) item).getControl();
569
570
571
572 row = row.replace("name=\"" + ((InputField) item).getBindingInfo().getBindingPath() + "\"",
573 "name=\"" + this.getBindingInfo().getBindingPath() + "[" + index + "]." + ((InputField) item)
574 .getPropertyName() + "\"");
575
576 Object value = ObjectPropertyUtils.getPropertyValue(obj, ((InputField) item).getPropertyName());
577 String stringValue = "";
578
579 if (value == null) {
580 stringValue = "";
581 } else if (value.getClass().isAssignableFrom(boolean.class)) {
582 stringValue = "" + value;
583 } else if (!(value instanceof Collection)) {
584 stringValue = value.toString();
585 }
586
587 String controlId = originalId + "_line" + index + UifConstants.IdSuffixes.CONTROL;
588
589 if (control instanceof CheckboxControl && stringValue.equalsIgnoreCase("true")) {
590
591 row = row.replaceAll("(id(\\s)*?=(\\s)*?\"" + controlId + "\")", "$1 checked=\"checked\" ");
592 } else if (control instanceof TextControl) {
593
594 row = row.replaceAll("(id(\\s)*?=(\\s)*?\"" + controlId + "\"(.|\\s)*?value=\")(.|\\s)*?\"",
595 "$1" + stringValue + "\"");
596 } else if (control instanceof SelectControl && !((SelectControl) control).isMultiple()) {
597
598 Pattern pattern = Pattern.compile("<select(\\s)*?id(\\s)*?=(\\s)*?\"" + controlId + "\"(.|\\s)*?</select>");
599 Matcher matcher = pattern.matcher(row);
600 String replacement = "";
601
602 if (matcher.find()) {
603
604 String selected = "selected=\"selected\"";
605 replacement = matcher.group().replace(selected, "");
606
607
608 String selectedValue = "value=\"" + stringValue + "\"";
609 replacement = replacement.replace(selectedValue, selectedValue + " " + selected);
610 }
611
612
613 if (StringUtils.isNotBlank(replacement)) {
614 row = matcher.replaceAll(replacement);
615 }
616 }
617
618 currentColumnValue = stringValue;
619
620 return row;
621 }
622
623
624
625
626
627
628 @BeanTagAttribute(name = "propertyName")
629 public String getPropertyName() {
630 return propertyName;
631 }
632
633
634
635
636
637
638 public void setPropertyName(String propertyName) {
639 this.propertyName = propertyName;
640 }
641
642
643
644
645
646
647 @BeanTagAttribute(name = "bindingInfo", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
648 public BindingInfo getBindingInfo() {
649 return bindingInfo;
650 }
651
652
653
654
655
656
657 public void setBindingInfo(BindingInfo bindingInfo) {
658 this.bindingInfo = bindingInfo;
659 }
660
661
662
663
664
665
666 public List<Label> getHeaderLabels() {
667 return headerLabels;
668 }
669
670
671
672
673
674
675 @BeanTagAttribute(name = "richTable", type = BeanTagAttribute.AttributeType.SINGLEBEAN)
676 public RichTable getRichTable() {
677 return richTable;
678 }
679
680
681
682
683
684
685 public void setRichTable(RichTable richTable) {
686 this.richTable = richTable;
687 }
688
689
690
691
692
693
694
695
696
697
698
699
700 @BeanTagAttribute(name = "conditionalRowCssClasses", type = BeanTagAttribute.AttributeType.MAPVALUE)
701 public Map<String, String> getConditionalRowCssClasses() {
702 return conditionalRowCssClasses;
703 }
704
705
706
707
708
709
710 public void setConditionalRowCssClasses(Map<String, String> conditionalRowCssClasses) {
711 this.conditionalRowCssClasses = conditionalRowCssClasses;
712 }
713
714
715
716
717
718
719 public boolean isEmptyTable() {
720 return emptyTable;
721 }
722
723 public void setHeaderLabels(List<Label> headerLabels) {
724 this.headerLabels = headerLabels;
725 }
726
727 public void setExpressionConversionMap(Map<String, String> expressionConversionMap) {
728 this.expressionConversionMap = expressionConversionMap;
729 }
730
731 public Map<String, String> getExpressionConversionMap() {
732 return expressionConversionMap;
733 }
734
735 public List<String> getInitialComponentIds() {
736 return initialComponentIds;
737 }
738
739 public Map<String, String> getRenderIdExpressionMap() {
740 return renderIdExpressionMap;
741 }
742
743 public void setInitialComponentIds(List<String> initialComponentIds) {
744 this.initialComponentIds = initialComponentIds;
745 }
746
747 public void setRenderIdExpressionMap(Map<String, String> renderIdExpressionMap) {
748 this.renderIdExpressionMap = renderIdExpressionMap;
749 }
750
751 public void setEmptyTable(boolean emptyTable) {
752 this.emptyTable = emptyTable;
753 }
754
755
756
757
758
759 @BeanTagAttribute(name = "currentColumnValue")
760 protected String getCurrentColumnValue() {
761 return currentColumnValue;
762 }
763
764
765
766
767
768
769 protected void setCurrentColumnValue(String currentColumnValue) {
770 this.currentColumnValue = currentColumnValue;
771 }
772
773
774
775
776 @Override
777 protected <T> void copyProperties(T component) {
778 super.copyProperties(component);
779 LightTable lightTableCopy = (LightTable) component;
780 lightTableCopy.setPropertyName(this.getPropertyName());
781
782 if (this.bindingInfo != null) {
783 lightTableCopy.setBindingInfo((BindingInfo) this.getBindingInfo().copy());
784 }
785
786 if (headerLabels != null) {
787 List<Label> headerLabelsCopy = new ArrayList<Label>();
788 for (Label headerLabel : headerLabels) {
789 if (headerLabel != null) {
790 headerLabelsCopy.add((Label) headerLabel.copy());
791 }
792 }
793 lightTableCopy.setHeaderLabels(headerLabelsCopy);
794 }
795
796 if (this.getRichTable() != null) {
797 lightTableCopy.setRichTable((RichTable) this.getRichTable().copy());
798 }
799
800 if (expressionConversionMap != null) {
801 Map<String, String> expressionConversionMapCopy = new HashMap<String, String>();
802 for (Map.Entry expressionConversionMapEntry : expressionConversionMap.entrySet()) {
803 expressionConversionMapCopy.put(expressionConversionMapEntry.getKey().toString(),
804 expressionConversionMapEntry.getValue().toString());
805 }
806 lightTableCopy.setExpressionConversionMap(expressionConversionMapCopy);
807 }
808
809 if (renderIdExpressionMap != null) {
810 Map<String, String> renderIdExpressionMapCopy = new HashMap<String, String>();
811 for (Map.Entry renderIdExpressionMapEntry : renderIdExpressionMap.entrySet()) {
812 renderIdExpressionMapCopy.put(renderIdExpressionMapEntry.getKey().toString(),
813 renderIdExpressionMapEntry.getValue().toString());
814 }
815 lightTableCopy.setRenderIdExpressionMap(renderIdExpressionMapCopy);
816 }
817
818 if (initialComponentIds != null) {
819 lightTableCopy.setInitialComponentIds(new ArrayList<String>(initialComponentIds));
820 }
821
822 if (this.conditionalRowCssClasses != null) {
823 lightTableCopy.setConditionalRowCssClasses(new HashMap<String, String>(this.conditionalRowCssClasses));
824 }
825
826 lightTableCopy.setEmptyTable(this.isEmptyTable());
827 lightTableCopy.setCurrentColumnValue(this.currentColumnValue);
828 }
829 }