I have also tried:

    <bean id="customerEditor" class="com.ism.ismid.model.CustomerEditor">
        <constructor-arg>
                <bean class="com.ism.ismid.service.impl.CustomerManagerImpl">   
  
                        <constructor-arg>         
                            <bean 
class="com.ism.ismid.dao.impl.CustomerDaoImpl">
                                        <constructor-arg>         
                                            <bean 
class="org.appfuse.dao.hibernate.GenericDaoHibernate"
autowire="byType">             
                                                <constructor-arg 
value="com.ism.ismid.model.Customer"/>         
                                            </bean>     
                                        </constructor-arg> 
                                    </bean>
                        </constructor-arg> 
                    </bean>
        </constructor-arg> 
    </bean>


but I end up with a CustomerEditor whose customerManager is null...






George.Francis wrote:
> 
> I tried adding the following to my applicationContext.xml:
>     <bean id="customerEditor" class="com.ism.ismid.model.CustomerEditor">
>               <property name="customerManager" ref="customerManager" />
>     </bean>
> 
> but I get the following exception:
> 
> 2007-10-17 13:54:09.145::WARN:  Nested in
> org.springframework.beans.factory.BeanCreationException: E
> rror creating bean with name 'customerEditor' defined in ServletContext
> resource [/WEB-INF/applicati
> onContext.xml]: Error setting property values; nested exception is
> org.springframework.beans.Propert
> yBatchUpdateException; nested PropertyAccessExceptions (1) are:
> PropertyAccessException 1:
> org.springframework.beans.TypeMismatchException: Failed to convert proper
> ty value of type [$Proxy44] to required type
> [com.ism.ismid.service.CustomerManager] for property 'c
> ustomerManager'; nested exception is java.lang.IllegalArgumentException:
> Cannot convert value of typ
> e [$Proxy44] to required type [com.ism.ismid.service.CustomerManager] for
> property 'customerManager'
> : no matching editors or conversion strategy found:
> 
> Do you know why this is?
> 
> 
> 
> mraible wrote:
>> 
>> You should be able to declare a bean definition to register property
>> editors, as well as use dependency injection to set their
>> dependencies.
>> 
>> Matt
>> 
>> On 10/17/07, George.Francis <[EMAIL PROTECTED]> wrote:
>>>
>>> Hello, in my CustomerEditor class, I have a
>>> public void setAsText(String text)
>>> which needs an instance of CustomerManager in order to resolve the
>>> correct
>>> Customer object.
>>> How is the CustomerManager usually passed to a CustomerEditor?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/CustomerEditor-needs-an-instance-of-CustomerManager-tf4642327s2369.html#a13259575
>>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> 
>> -- 
>> http://raibledesigns.com
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/CustomerEditor-needs-an-instance-of-CustomerManager-tf4642327s2369.html#a13262240
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to