File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamically initialising bean properties

 
Shasi Mitra
Ranch Hand
Posts: 101
Flex Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to initialise my bean properties from some other bean. Like

<bean id="testVO" class="com.TestVO" scope= "request">
<property name = "name" >
<value>#{bean2.name}</value>
</property>
</bean>

Is it possible to get name from bean2 and put in testVO dynamically?
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No because the value of the variable you have is not set till runtime. Whereas the configuration is during development time, meaning you can't set a value in the configuration to a value that isn't set till runtime.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic