In my CustomerFieldHandler:
public class CustomerFieldHandler extends GeneralizedFieldHandler {
private ICustomerManager customerManager;
public Object convertUponSet(Object value) {
Customer customer = null;
if (value != null) {
customer = customerManager.getByID( (Long) value);
customer.setDeviceAddress((String)value);
}
return customer;
}
The problem is that the CustomerManager instance is controlled with Spring.
How do I connect this FieldHandler to Spring in order to have a manager's
instance injected?
Werner Guttmann wrote:
>
> Can you show us some code fragments that illustrate what you are trying
> to do ?
>
> Werner
>
> Felipe Toledo wrote:
>> Hil all,
>>
>> Im trying to use Castor with Spring.
>>
>> The problem:
>> - In my xml is mapped the Customer ID;
>> - This Customer is just instantiated thru the CustomerManager, which
>> instance is controlled with spring.
>> - I have created the CustomerFieldHandler to create/retrieve the new
>> instance.
>>
>> Question: How to inject a new CustomerManager instance in the
>> FieldHandler?
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
--
View this message in context:
http://www.nabble.com/Connecting-Castor-with-Spring-tp16447849p16467536.html
Sent from the Castor - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email