protected void initItems() { if (null != this.getStaticItems() && this.getStaticItems().trim().length() > 0) { this.setItems(this.getStaticItems().split(this.getCustomSeparator())); } if (null != this.getExtractorBeanName()) { try { EnumeratorAttributeItemsExtractor extractor = this.getExtractorBean(); if (null != extractor) { List<String> items = extractor.getItems(); if (items != null && items.size() > 0) { this.addExtractedItems(items); } } } catch (Throwable t) { _logger.error("Error while extract items from bean extractor '{}'", this.getExtractorBeanName(), t); } } }
protected void initItems() { if (null != this.getStaticItems() && this.getStaticItems().trim().length() > 0) { this.setItems(this.getStaticItems().split(this.getCustomSeparator())); } if (null != this.getExtractorBeanName()) { try { EnumeratorAttributeItemsExtractor extractor = (EnumeratorAttributeItemsExtractor) this.getBeanFactory().getBean(this.getExtractorBeanName(), EnumeratorAttributeItemsExtractor.class); if (null != extractor) { List<String> items = extractor.getItems(); if (items != null && items.size() > 0) { this.addExtractedItems(items); } } } catch (Throwable t) { ApsSystemUtils.logThrowable(t, this, "initItems", "Error while extract items from bean extractor '" + this.getExtractorBeanName() + "'"); } } if (null != this.getItems()) { String[] items = new String[this.getItems().length]; for (int i = 0; i < this.getItems().length; i++) { if (null != this.getItems()[i]) { items[i] = this.getItems()[i].trim(); } } this.setItems(items); } }