Announcement Announcement Module
Collapse
No announcement yet.
Programatic List Property Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Programatic List Property

    Currently we are getting bean definition from the factory and modifying the one bean property programatically as below and adding back to factory

    ConstructorArgumentValues lConstructorArgs = new ConstructorArgumentValues();
    lConstructorArgs.addGenericArgumentValue(factoryNa me);
    lConstructorArgs.addGenericArgumentValue(component Name);

    RootBeanDefinition lRootBD = new RootBeanDefinition();
    lRootBD.setBeanClassName(beanClassName);
    lRootBD.setConstructorArgumentValues(lConstructorA rgs);
    lRootBD.setFactoryMethodName(methodName);
    lRootBD.setResourceDescription(description);

    BeanDefinitionHolder lValue = new BeanDefinitionHolder(lRootBD, name);

    PropertyValue lPropertyValue = new PropertyValue(pName, lValue);

    List lTransformedPropertyList = new ArrayList();
    lTransformedPropertyList.add(lPropertyValue);

    lIterator = lTransformedPropertyList.iterator();

    //getting bean definition from the factory
    beanDefinition.getPropertyValues().getPropertyValu eList().add(lIterator)

    Now I need to add a bean list programatically which is having 3 beans; one bean i need to modify and others need to be added with out any modification. How can i do this?
Working...
X