IvanLatysh
Sep 1st, 2004, 11:13 AM
Hi.
I am using Spring for my Swing application.
And I came across a small problem.
I have a bean than extends JDialog class.
<bean id="infoDialog" class="InfoDialog" singleton="false" init-method="initUI">
<constructor-arg index="0"><ref bean="mainWindow"/></constructor-arg>
</bean>
That works fine. But I need to instantiate this bean with a different constructor argument.
Basically I need to create a dialog and pass another dialog as constructor parameter and need to do so from my code, not from a config.
Something like this bean_factory.getBean("infoDialog", new Object[]{MyParentDialog})
How I can do it ?
I am using Spring for my Swing application.
And I came across a small problem.
I have a bean than extends JDialog class.
<bean id="infoDialog" class="InfoDialog" singleton="false" init-method="initUI">
<constructor-arg index="0"><ref bean="mainWindow"/></constructor-arg>
</bean>
That works fine. But I need to instantiate this bean with a different constructor argument.
Basically I need to create a dialog and pass another dialog as constructor parameter and need to do so from my code, not from a config.
Something like this bean_factory.getBean("infoDialog", new Object[]{MyParentDialog})
How I can do it ?