1 package fr.improve.struts.taglib.layout.collection; 2 3 import java.util.ArrayList ; 4 import java.util.Collection ; 5 import java.util.HashMap ; 6 import java.util.Iterator ; 7 import java.util.List ; 8 import java.util.Map ; 9 10 import javax.servlet.http.HttpServletRequest ; 11 import javax.servlet.jsp.JspException ; 12 import javax.servlet.jsp.PageContext ; 13 14 import org.apache.struts.Globals; 15 import org.apache.struts.taglib.html.Constants; 16 17 import fr.improve.struts.taglib.layout.BodyLayoutTagSupport; 18 import fr.improve.struts.taglib.layout.collection.header.CollectionItemEvent; 19 import fr.improve.struts.taglib.layout.collection.header.MultiLevelHeader; 20 import fr.improve.struts.taglib.layout.collection.header.MultiLevelTitleHandler; 21 import fr.improve.struts.taglib.layout.el.Expression; 22 import fr.improve.struts.taglib.layout.event.EndLayoutEvent; 23 import fr.improve.struts.taglib.layout.event.StartLayoutEvent; 24 import fr.improve.struts.taglib.layout.field.AbstractModeFieldTag; 25 import fr.improve.struts.taglib.layout.pager.PagerContainer; 26 import fr.improve.struts.taglib.layout.sort.JavascriptSortUtil; 27 import fr.improve.struts.taglib.layout.sort.SortUtil; 28 import fr.improve.struts.taglib.layout.util.CollectionInterface; 29 import fr.improve.struts.taglib.layout.util.FormUtilsInterface; 30 import fr.improve.struts.taglib.layout.util.IMultiLevelHeaderRenderer; 31 import fr.improve.struts.taglib.layout.util.LayoutUtils; 32 import fr.improve.struts.taglib.layout.util.NestedHelper; 33 import fr.improve.struts.taglib.layout.util.TagUtils; 34 import fr.improve.struts.taglib.layout.util.WidgetUtils; 35 36 47 public abstract class BaseCollectionTag extends BodyLayoutTagSupport implements PagerContainer, MultiLevelTitleHandler { 48 49 53 public static class Header extends SimpleItemContext { 54 public String key; 55 58 public Header(ItemContext in_context) { 59 super(in_context); 60 key = in_context.getTitle(); 61 } 62 } 63 64 protected ArrayList headers = new ArrayList (); 65 66 69 protected static CollectionInterface defaultPanel; 70 73 protected CollectionInterface panel; 74 77 protected String name = Constants.BEAN_KEY; 78 81 protected String property; 82 83 86 protected String name2; 87 90 protected String property2; 91 92 protected CollectionsIterator iterator; 93 protected Iterator iterator2; 94 protected String id; 95 protected String id2; 96 protected String mathOperationId; 97 98 protected String indexId; 99 protected String oddId; 100 protected String offsetIndexId; 101 102 105 protected String title; 106 protected String arg0Name; 107 108 111 protected String bundle = Globals.MESSAGES_KEY; 112 113 116 protected String styleClass; 117 118 121 protected String styleClass2; 122 123 protected boolean first = true; 124 125 protected Object bean; 126 protected Object bean2; 127 128 132 protected Map span = new HashMap (); 133 134 protected int index = 0; 135 136 protected int offset = 0; 137 138 protected int length = 0; 139 140 protected int size = 0; 141 142 protected int nbOfColumns = 0; 143 protected int column = 0; 144 145 148 public static final int SORT_NO = 0; 149 152 public static final int SORT_LAYOUT = 1; 153 156 public static final int SORT_CUSTOM = 2; 157 160 public static final int SORT_JAVASCRIPT = 3; 161 165 public static final int SORT_PAGER = 4; 166 167 170 protected int sortType = SORT_NO; 171 174 protected String sortAction; 175 178 protected String sortParam; 179 182 protected String sortPictogram ="layout.sort"; 183 186 protected String sortLabel = "layout.sort.label"; 187 188 191 protected String width; 192 193 196 protected String height; 197 198 201 protected String align = "CENTER"; 202 203 206 210 protected String selectName; 211 214 protected String selectProperty; 215 218 protected String selectType = "checkbox"; 219 222 protected boolean selectHidden = false; 223 226 protected boolean needSelect = false; 227 231 protected String selectIndex; 232 233 protected String selectId; 234 235 237 protected short fieldDisplayMode = AbstractModeFieldTag.MODE_EDIT; 238 239 242 protected String tempStyleClass; 243 244 247 protected List tempStyles = new ArrayList (); 248 249 252 protected String emptyKey; 253 254 257 protected String onRowClick; 258 259 262 protected String onRowDblClick; 263 264 267 protected String onRowMouseOver; 268 protected String onRowMouseOut; 269 270 protected String jspOnRowMouseOver; 271 protected String jspOnRowMouseOut; 272 protected String jspProperty; 273 protected String jspStyleClass; 274 275 278 protected String onClick; 279 280 283 protected String styleId; 284 285 288 protected String model; 289 290 291 protected abstract void renderBlankCollection(StringBuffer out_buffer) throws JspException ; 292 protected abstract void renderStart(StringBuffer out_buffer) throws JspException ; 293 protected void renderHeader(StringBuffer buffer, ItemContext in_header) throws JspException { 294 renderHeader(buffer, (Header)in_header); 295 } 296 297 300 protected void renderHeader(StringBuffer buffer, Header in_header) throws JspException { 301 } 303 protected abstract void renderEnd(StringBuffer out_buffer) throws JspException ; 304 305 public void addItem(StringBuffer in_buffer, ItemContext in_context) throws JspException { 306 if (first) { 307 309 Header lc_header = new Header(in_context); 311 lc_header.key = in_context.getTitle(); 312 headers.add(lc_header); 313 nbOfColumns++; 314 if (in_context.getSortProperty()!=null && (sortType==SORT_NO || sortType==SORT_PAGER)) { 315 findSortType(); 316 } 317 } else { 318 addItem(in_buffer, in_context.getItem(), in_context.getUrl(), in_context.getTarget(), in_context.getOnclick()); 319 } 320 column++; 321 } 322 323 protected List multiLevelHeaders; 324 protected int headersLevel; 325 326 327 private void findSortType() { 328 if (sortAction==null || sortAction.equals("") || sortType==SORT_PAGER && "client".equals(sortAction)) { 329 sortType = SORT_LAYOUT; 330 } else if (sortAction.equals("client")) { 331 sortType = SORT_JAVASCRIPT; 332 sortParam = JavascriptSortUtil.getId((HttpServletRequest )pageContext.getRequest()); 333 } else { 334 sortType = SORT_CUSTOM; 335 } 336 } 337 338 public void incrementColumn() { 339 column++; 340 } 341 342 protected abstract void addItem(StringBuffer in_buffer, String in_item, String in_url, String in_target, String in_onlick) throws JspException ; 343 public int doAfterBody() throws JspException { 344 if (first) { 345 347 if (sortType==SORT_LAYOUT) { 348 CollectionsIterator lc_nestedIterator = iterator.getNestedIterator(); 350 351 Collection lc_collection1 = LayoutUtils.getCollection( LayoutUtils.getBeanFromPageContext(pageContext, name, property), false); 353 SortUtil.addCollection( lc_collection1, (javax.servlet.http.HttpServletRequest ) pageContext.getRequest()); 354 SortUtil lc_sortUtil = (SortUtil) pageContext.getRequest().getAttribute(SortUtil.SORTUTIL_KEY); 355 if (lc_sortUtil != null) { 356 lc_collection1 = lc_sortUtil.getSortedCollection(); 358 359 } 360 361 iterator = new CollectionsIterator(lc_collection1, null, id, indexId); 362 363 if (name2 != null) 365 iterator2 = LayoutUtils.getIterator(pageContext, name2, property2); 366 367 iterator.addLastIterator(lc_nestedIterator); 369 370 size = lc_collection1.size(); 371 } 372 373 Map lc_map = new HashMap (); 374 for (int i=0;i<offset;i++) { 375 if (iterator.hasNext(pageContext)) iterator.skip(pageContext, lc_map); 376 if (iterator2!=null && iterator2.hasNext()) iterator2.next(); 377 } 378 379 TagUtils.write(pageContext, renderHeaders().toString()); 380 } else { 381 StringBuffer lc_buffer = new StringBuffer (); 383 renderEndLine(lc_buffer); 384 TagUtils.write(pageContext, lc_buffer.toString()); 385 } 386 387 if (bodyContent != null) { 389 TagUtils.writePrevious(pageContext, bodyContent.getString()); 390 bodyContent.clearBody(); 391 } 392 393 395 if (iterator.hasNext(pageContext) && (length==0 || index < length || iterator.getNestedIterator()!=null && iterator.getNestedIterator().hasNext(pageContext))) { 396 397 span.clear(); 398 bean = iterator.next(pageContext, span); 399 400 if (iterator2!=null && iterator2.hasNext()) { 401 bean2 = iterator2.next(); 402 if (id2!=null) { 403 span.put(id2, new Integer (1)); 404 if (bean2!=null) pageContext.setAttribute(id2, bean2); 405 else pageContext.removeAttribute(id2); 406 } 407 } 408 409 int lc_oldIndex = index; 410 index = iterator.getIndex(); 411 412 if (oddId!=null) pageContext.setAttribute(oddId, new Boolean ((index-1)%2==0)); 413 if (offsetIndexId!=null) pageContext.setAttribute(offsetIndexId, new Integer (index-1+offset)); 414 if ((selectName!=null && selectName.length()>0 || selectProperty!=null && selectProperty.length()!=0)&& 415 (fieldDisplayMode!=FormUtilsInterface.CREATE_MODE) && 416 lc_oldIndex!=index) { 417 needSelect = true; 418 } 419 420 if (styleClass2!=null) { 422 String temp = styleClass2; 423 styleClass2 = styleClass; 424 styleClass = temp; 425 } 426 427 StringBuffer lc_buffer = new StringBuffer (); 428 renderStartLine(lc_buffer); 429 TagUtils.write(pageContext, lc_buffer.toString()); 430 431 first = false; 432 return EVAL_BODY_TAG; 433 434 } else { 435 first = false; 436 if (id!=null) pageContext.removeAttribute(id); 437 if (id2!=null) pageContext.removeAttribute(id2); 438 if (indexId!=null) pageContext.removeAttribute(indexId); 439 if (oddId!=null) pageContext.removeAttribute(oddId); 440 if (offsetIndexId!=null) pageContext.removeAttribute(offsetIndexId); 441 return SKIP_BODY; 442 } 443 } 444 447 public Object getBean() { 448 return bean; 449 } 450 455 public java.lang.String getEmptyKey() { 456 return emptyKey; 457 } 458 461 public int getIndex() { 462 return index - 1; 463 } 464 469 public java.lang.String getIndexId() { 470 return indexId; 471 } 472 476 public java.lang.String getName() { 477 return name; 478 } 479 483 public java.lang.String getProperty() { 484 return property; 485 } 486 491 public java.lang.String getSelectProperty() { 492 return selectProperty; 493 } 494 499 public java.lang.String getSelectType() { 500 return selectType; 501 } 502 507 public java.lang.String getSortAction() { 508 return sortAction; 509 } 510 515 public java.lang.String getSortParam() { 516 return sortParam; 517 } 518 523 public java.lang.String getSortPictogram() { 524 String lc_property = ((ItemContext)headers.get(getColumn())).getProperty(); 525 if (sortType==SORT_LAYOUT && !"none".equals(sortPictogram)) { 526 switch (SortUtil.getSortState((HttpServletRequest )pageContext.getRequest(), lc_property)) { 527 case -1: 528 return sortPictogram + ".forward"; 529 case 1: 530 return sortPictogram + ".reverse"; 531 default: 532 return sortPictogram; 533 } 534 } else { 535 return sortPictogram; 536 } 537 } 538 public String getSortLabel() { 539 return sortLabel; 540 } 541 545 public java.lang.String getStyleClass() { 546 return styleClass; 547 } 548 553 public java.lang.String getTempStyleClass() { 554 return tempStyleClass; 555 } 556 public String getId() { 557 return id; 558 } 559 public String getId2() { 560 return id2; 561 } 562 public String getName2() { 563 return name2; 564 } 565 public String getProperty2() { 566 return property2; 567 } 568 569 public boolean isFirst() { 570 return first; 571 } 572 public void release() { 573 super.release(); 574 575 title = null; 576 arg0Name = null; 577 align = "CENTER"; 578 width = null; 579 height = null; 580 bundle = Globals.MESSAGES_KEY; 581 582 onClick = null; 583 onRowClick = null; 584 onRowDblClick = null; 585 onRowMouseOver = null; 586 onRowMouseOut = null; 587 588 name = Constants.BEAN_KEY; 589 property = null; 590 id = null; 591 592 name2 = null; 593 property2 = null; 594 id2 = null; 595 596 styleClass = null; 597 styleClass2 = null; 598 599 indexId = null; 600 oddId = null; 601 offsetIndexId = null; 602 603 sortAction = null; 604 sortPictogram = "layout.sort"; 605 sortLabel = "layout.sort.label"; 606 607 selectName = null; 608 selectProperty = null; 609 selectIndex = null; 610 selectId = null; 611 selectType = "checkbox"; 612 selectHidden = false; 613 614 emptyKey = null; 615 616 model = null; 617 } 618 621 protected void reset() { 622 iterator = null; 623 iterator2 = null; 624 625 first = true; 626 627 bean = null; 628 bean2 = null; 629 630 index = 0; 631 632 nbOfColumns = 0; 633 column = 0; 634 635 sortType = SORT_NO; 636 637 needSelect = false; 638 639 mathOperationId = null; 640 641 sortParam = null; 643 onRowClick = null; 644 styleId = null; 645 offset = 0; 646 length = 0; 647 648 headers.clear(); 649 tempStyles.clear(); 650 651 span.clear(); 652 panel = null; 653 654 onRowMouseOver = jspOnRowMouseOver; jspOnRowMouseOver = null; 655 onRowMouseOut = jspOnRowMouseOut; jspOnRowMouseOut = null; 656 property = jspProperty; jspProperty = null; 657 658 styleClass = jspStyleClass; 659 jspStyleClass = null; 660 multiLevelHeaders = null; 661 } 662 667 public void setEmptyKey(java.lang.String newEmptyKey) { 668 emptyKey = newEmptyKey; 669 } 670 public void setId(String id) { 671 this.id = id; 672 } 673 public void setId2(String id2) { 674 this.id2 = id2; 675 } 676 681 public void setIndexId(java.lang.String newIndexId) { 682 indexId = newIndexId; 683 } 684 688 public void setMode(String mode) throws JspException { 689 fieldDisplayMode = LayoutUtils.getSkin(pageContext.getSession()).getFormUtils().computeFieldDisplayMode(pageContext, mode); 690 } 691 695 public void setName(java.lang.String newName) { 696 name = newName; 697 } 698 public void setName2(String name2) { 699 this.name2 = name2; 700 } 701 705 public void setProperty(java.lang.String newProperty) { 706 property = newProperty; 707 } 708 public void setProperty2(String property2) { 709 this.property2 = property2; 710 } 711 public void setSelectName(String name) { 712 selectName = name; 713 } 714 public String getSelectName() { 715 return selectName; 716 } 717 722 public void setSelectProperty(java.lang.String newSelectProperty) { 723 selectProperty = newSelectProperty; 724 } 725 730 public void setSelectType(java.lang.String newSelectType) { 731 if (newSelectType == null) { 732 selectType = "checkbox"; 733 selectHidden = false; 734 } else { 735 String lc_lower = newSelectType.toLowerCase(); 736 if (lc_lower.startsWith("radio")) { 737 selectType = "radio"; 738 } else { 739 selectType = "checkbox"; 740 } 741 if (lc_lower.endsWith("hidden")) { 742 selectHidden = true; 743 } else { 744 selectHidden = false; 745 } 746 } 747 } 748 753 public void setSortAction(java.lang.String newSortAction) { 754 sortAction = newSortAction; 755 } 756 761 public void setSortParam(java.lang.String newSortParam) { 762 sortParam = newSortParam; 763 } 764 769 public void setSortPictogram(java.lang.String newSortPictogram) { 770 sortPictogram = newSortPictogram; 771 } 772 public void setSortLabel(String newSortLabel) { 773 sortLabel = newSortLabel; 774 } 775 779 public void setStyleClass(java.lang.String newStyleClass) { 780 styleClass = newStyleClass; 781 } 782 787 void setTempStyleClass(java.lang.String newTempStyleClass) { 788 tempStyleClass = newTempStyleClass; 789 } 790 void addTempStyle(String in_tempStyle) { 791 tempStyles.add(in_tempStyle); 792 } 793 void removeTempStyle() { 794 tempStyles.remove(tempStyles.size()-1); 795 } 796 800 public void setTitle(java.lang.String newTitle) { 801 title = newTitle; 802 } 803 public void setArg0Name(String in_arg0Name) { 804 arg0Name = in_arg0Name; 805 } 806 public String getArg0Name() { 807 return arg0Name; 808 } 809 public String getTitle() { 810 return title; 811 } 812 public void setWidth(String width) { 813 this.width = width; 814 } 815 public String getWidth() { 816 return width; 817 } 818 822 public String getStyleClass2() { 823 return styleClass2; 824 } 825 826 830 public void setStyleClass2(String styleClass2) { 831 this.styleClass2 = styleClass2; 832 } 833 834 838 public String getAlign() { 839 return align; 840 } 841 842 846 public void setAlign(String align) { 847 this.align = align; 848 } 849 850 protected void initPanel(PageContext in_pageContext) { 851 try { 852 defaultPanel = (CollectionInterface) LayoutUtils.getSkin(in_pageContext.getSession()).getCollectionClass(model).newInstance(); 853 } catch (Exception e) { 854 defaultPanel = new fr.improve.struts.taglib.layout.util.BasicCollection(); 855 } 856 panel = defaultPanel; 857 } 858 859 863 public int getLength() { 864 return length; 865 } 866 867 871 public void setLength(int length) { 872 this.length = length; 873 } 874 875 879 public int getOffset() { 880 return offset; 881 } 882 883 887 public void setOffset(int offset) { 888 this.offset = offset; 889 } 890 891 public int getSize() { 892 return size; 893 } 894 895 899 public String getSelectIndex() { 900 return selectIndex; 901 } 902 903 public String getSelectId() { 904 return selectId; 905 } 906 907 911 public void setSelectIndex(String selectIndex) { 912 this.selectIndex = selectIndex; 913 } 914 public void setSelectId(String selectId) { 915 this.selectId = selectId; 916 } 917 public int doStartLayoutTag() throws JspException { 918 919 if (fieldDisplayMode == AbstractModeFieldTag.MODE_NODISPLAY) 920 return SKIP_BODY; 921 922 new StartLayoutEvent(this, new StringBuffer ("<td colspan=\"").append(LayoutUtils.getSkin(pageContext.getSession()).getFieldInterface().getColumnNumber()).append("\" valign=\"top\">")).send(); 924 925 Object lc_bean = LayoutUtils.getBeanFromPageContext(pageContext, name, property); 927 Collection lc_collection = LayoutUtils.getCollection(lc_bean); 928 Object lc_mainBean = LayoutUtils.getBeanFromPageContext(pageContext, name, null); 929 iterator = new CollectionsIterator(lc_mainBean, property, id, indexId); 931 size = lc_collection.size(); 932 933 if (name2 != null) 935 iterator2 = LayoutUtils.getIterator(pageContext, name2, property2); 936 937 StringBuffer buffer = new StringBuffer (); 938 939 if (panel==null) { 941 initPanel(pageContext); 942 } 943 panel.init(pageContext, styleClass, this); 944 945 renderStart(buffer); 952 TagUtils.write(pageContext, buffer.toString()); 953 return EVAL_BODY_TAG; 954 } 956 957 960 protected void initDynamicValues() { 961 jspOnRowMouseOut = onRowMouseOut; 962 jspOnRowMouseOver = onRowMouseOver; 963 jspProperty = property; 964 jspStyleClass = styleClass; 965 if (styleClass==null) { 966 styleClass = LayoutUtils.getSkin(pageContext.getSession()).getProperty("styleclass.collection", null); 967 } 968 property = NestedHelper.getAdjustedProperty(jspProperty, pageContext); 969 property = Expression.evaluate(property, pageContext); 970 mathOperationId = WidgetUtils.generateId(pageContext.getRequest(),"MATHOP"); 971 } 972 973 public int doEndLayoutTag() throws JspException { 974 if (fieldDisplayMode==AbstractModeFieldTag.MODE_NODISPLAY) return SKIP_BODY; 975 StringBuffer buffer = new StringBuffer (); 976 977 if (index==0 && emptyKey!=null) { 978 renderBlankCollection(buffer); 979 } 980 981 renderEnd(buffer); 982 TagUtils.write(pageContext,buffer.toString()); 983 984 new EndLayoutEvent(this, "</td>").send(); 985 return EVAL_PAGE; 986 } 987 protected StringBuffer renderHeaders() throws JspException { 988 StringBuffer lc_buffer = new StringBuffer (); 989 if (panel instanceof IMultiLevelHeaderRenderer) { 990 renderMultiLevelHeaders(lc_buffer, multiLevelHeaders, headersLevel); 991 column = 0; 992 } else { 993 column = 0; 994 panel.doStartHeaders(lc_buffer); 995 for (int i=0;i<headers.size();i++) { 996 ItemContext lc_header = (ItemContext) headers.get(i); 997 renderHeader(lc_buffer, lc_header); 998 column++; 999 } 1000 column = 0; 1001 panel.doEndHeaders(lc_buffer); 1002 } 1003 column = 0; 1004 return lc_buffer; 1005 } 1006 1007 1012 protected abstract void renderMultiLevelHeaders(StringBuffer lc_buffer, List multiLevelHeaders2, int headersLevel2) throws JspException ; 1013 1014 public void renderEndLine(StringBuffer in_buffer) throws JspException { 1015 panel.doEndItems(in_buffer); 1016 column = 0; 1017 } 1018 public void renderStartLine(StringBuffer in_buffer) throws JspException { 1019 panel.doStartItems(in_buffer); 1020 } 1021 1022 void addIterator(CollectionsIterator in_iterator) { 1023 iterator.addLastIterator(in_iterator); 1024 } 1025 1029 public int getColumn() { 1030 return column; 1031 } 1032 1033 1037 public int getNbOfColumns() { 1038 return nbOfColumns; 1039 } 1040 1041 1045 public void setOnRowClick(String onRowClick) { 1046 this.onRowClick = onRowClick; 1047 } 1048 1049 1053 public String getOnRowClick() { 1054 return onRowClick; 1055 } 1056 1057 1061 public String getStyleId() { 1062 return styleId; 1063 } 1064 1065 1069 public void setStyleId(String styleId) { 1070 this.styleId = styleId; 1071 } 1072 1073 1077 public String getHeight() { 1078 return height; 1079 } 1080 1081 1085 public void setHeight(String height) { 1086 this.height = height; 1087 } 1088 1092 public String getOddId() { 1093 return oddId; 1094 } 1095 1096 1100 public void setOddId(String oddId) { 1101 this.oddId = oddId; 1102 } 1103 1104 1108 public int getSortType() { 1109 return sortType; 1110 } 1111 1112 1116 public void setSortType(int sortType) { 1117 this.sortType = sortType; 1118 if (sortType==SORT_PAGER) { 1119 findSortType(); 1120 } 1121 } 1122 1123 1127 public String getOnRowDblClick() { 1128 return onRowDblClick; 1129 } 1130 1131 1135 public void setOnRowDblClick(String onRowDblClick) { 1136 this.onRowDblClick = onRowDblClick; 1137 } 1138 public List getHeaders() { 1139 return headers; 1140 } 1141 1142 1146 public String getOnClick() { 1147 return onClick; 1148 } 1149 1150 1154 public void setOnClick(String onClick) { 1155 this.onClick = onClick; 1156 } 1157 public Map getSpans() { 1158 return span; 1159 } 1160 public boolean isNestedIteration() { 1161 return iterator.hasNestedIterator(); 1162 } 1163 1164 1167 public String getOnRowMouseOver() { 1168 return onRowMouseOver; 1169 } 1170 1171 1174 public void setOnRowMouseOver(String string) { 1175 onRowMouseOver = string; 1176 } 1177 1178 1182 public String getModel() { 1183 return model; 1184 } 1185 1186 1190 public void setModel(String model) { 1191 this.model = model; 1192 } 1193 1194 public String getOnRowMouseOut() { 1195 return onRowMouseOut; 1196} 1197 public void setOnRowMouseOut(String in_onRowMouseOut) { 1198 onRowMouseOut = in_onRowMouseOut; 1199 } 1200 1201 1204 public void setOffsetIndexId(String offsetIndexId) { 1205 this.offsetIndexId = offsetIndexId; 1206 } 1207 1210 public String getMathOperationId() { 1211 return mathOperationId; 1212 } 1213 public Object addCollectionTitle(CollectionItemEvent in_event) { 1214 MultiLevelHeader lc_header = (MultiLevelHeader) in_event.getValue(); 1215 if (multiLevelHeaders==null) { 1216 multiLevelHeaders = new ArrayList (); 1217 } 1218 multiLevelHeaders.add(lc_header); 1219 headersLevel = Math.max(headersLevel, lc_header.getLevel()); 1220 return null; 1221 } 1222 1225 public String getBundle() { 1226 return bundle; 1227 } 1228 1231 public void setBundle(String bundle) { 1232 this.bundle = bundle; 1233 } 1234} 1235 | Popular Tags |