Joe,
this is exactly what I use. You'll need to modify some parts to suit your enviroment.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<!-- $Id: richclient-application-context.xml,v 1.3 2004/10/11 00:23:15 oliverh Exp $ -->
<beans>
<bean id="application"
class="org.springframework.richclient.application.Application">
<constructor-arg index="0">
<ref bean="applicationDescriptor"/>
</constructor-arg>
<constructor-arg index="1">
<ref bean="applicationAdvisor"/>
</constructor-arg>
</bean>
<bean id="applicationAdvisor"
class="org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor">
<property name="startingPageId">
<value>applicationAdvisor</value>
</property>
</bean>
<bean id="applicationDescriptor"
class="org.springframework.richclient.application.ApplicationDescriptor">
<property name="version">
<value>1.0</value>
</property>
<property name="buildId">
<value>20041025001</value>
</property>
</bean>
<bean id="applicationObjectConfigurer"
class="org.springframework.richclient.application.config.DefaultApplicationObjectConfigurer">
<constructor-arg index="0">
<ref bean="messageSource"/>
</constructor-arg>
<constructor-arg index="1">
<ref bean="imageSource"/>
</constructor-arg>
<constructor-arg index="2">
<ref bean="iconSource"/>
</constructor-arg>
</bean>
<bean id="applicationEventMulticaster"
class="org.springframework.context.event.SimpleApplicationEventMulticaster"/>
<bean id="componentFactory"
class="org.springframework.richclient.factory.DefaultComponentFactory">
<property name="iconSource">
<ref bean="iconSource"/>
</property>
</bean>
<bean id="propertyEditorRegistry"
class="org.springframework.richclient.application.support.DefaultPropertyEditorRegistry">
<property name="propertyEditors">
<list>
<props>
<prop key="objectClass">ourcommunity.util.DateRange</prop>
<prop key="propertyEditorClass">
ourcommunity.admin.util.DateRangePropertyEditor</prop>
</props>
<props>
<prop key="objectClass">java.util.Date</prop>
<prop key="propertyEditorClass">
ourcommunity.admin.util.DatePropertyEditor</prop>
</props>
</list>
</property>
</bean>
<bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>org.springframework.richclient.application.messages</value>
<value>ourcommunity.admin.util.rcp.messages</value>
</list>
</property>
</bean>
<bean id="imageResourcesFactory"
class="org.springframework.context.support.ResourceMapFactoryBean">
<property name="locations">
<list>
<value>classpath:org/springframework/richclient/image/images.properties</value>
</list>
</property>
<property name="resourceBasePath">
<value>images/</value>
</property>
</bean>
<bean id="imageSource"
class="org.springframework.richclient.image.DefaultImageSource">
<constructor-arg index="0">
<ref bean="imageResourcesFactory"/>
</constructor-arg>
<property name="brokenImageIndicator">
<value>images/alert/error_obj.gif</value>
</property>
</bean>
<bean id="iconSource"
class="org.springframework.richclient.image.DefaultIconSource">
<constructor-arg index="0">
<ref bean="imageSource"/>
</constructor-arg>
</bean>
<bean id="formComponentInterceptorFactory"
class="org.springframework.richclient.form.builder.support.ChainedInterceptorFactory">
<property name="interceptorFactories">
<list>
<bean
class="org.springframework.richclient.form.builder.support.ColorValidationInterceptorFactory">
<property name="errorColor">
<value>255,245,245</value>
</property>
</bean>
<bean
class="org.springframework.richclient.form.builder.support.OverlayValidationInterceptorFactory"
/>
<bean
class="org.springframework.richclient.text.TextComponentPopupInterceptorFactory"
/>
</list>
</property>
</bean>
</beans>
for loading I use ClassPathXmlApplicationContext :
Code:
new ClassPathXmlApplicationContext(
"/appcontext/richclient-application-context.xml");
HTH
Ollie