You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nicolas De Loof <ni...@capgemini.com> on 2004/04/30 14:29:17 UTC

where to use ConvertUtils.register ?

Hello,

I just discovered the use of BeanUtils.copyProperties to populate my formbeans from business objets. I would like to
know where to configure my Converters (using ConvertUtils.register) ?

I use a static initialiser in my BaseAction class. Do you have something better to suggest ?

Nico.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: where to use ConvertUtils.register ?

Posted by Joe Germuska <Jo...@Germuska.com>.
At 2:29 PM +0200 4/30/04, Nicolas De Loof wrote:
>Hello,
>
>I just discovered the use of BeanUtils.copyProperties to populate my 
>formbeans from business objets. I would like to
>know where to configure my Converters (using ConvertUtils.register) ?
>
>I use a static initialiser in my BaseAction class. Do you have 
>something better to suggest ?

A PlugIn would probably be cleaner (or, if you are using Servlet 2.3 
and if you prefer, a ServletContextListener).

See
http://jakarta.apache.org/struts/api/org/apache/struts/action/PlugIn.html
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
       "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
             -- Jef Raskin

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org