jQuery in Action, 3rd edition
The moose likes Other Application Frameworks and the fly likes Dynamically initialising bean properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Dynamically initialising bean properties" Watch "Dynamically initialising bean properties" New topic

Dynamically initialising bean properties

Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

I want to initialise my bean properties from some other bean. Like

<bean id="testVO" class="com.TestVO" scope= "request">
<property name = "name" >

Is it possible to get name from bean2 and put in testVO dynamically?
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link: http://aspose.com/file-tools
subject: Dynamically initialising bean properties
It's not a secret anymore!