A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCM Java EE 6 Enterprise Architect Exam Guide
this week in the
Other Application Frameworks
Dynamically initialising bean properties
Joined: Nov 27, 2008
Mar 03, 2009 07:34:26
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?
Joined: Feb 05, 2001
Mar 03, 2009 20:12:03
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
Two Laptop Bag
How to Ask Questions the Smart Way FAQ
subject: Dynamically initialising bean properties
how to define multiple beans
Dynamic ACL's in Acegi.
mapping bean properties question
unable to set attribute using <c:set> using the body
Setting property value of Bean dynamically through code.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014