|
From: <jue...@we...> - 2003-04-09 15:54:17
|
Hi Bruno,
The line registering PropertiesEditor isn't necessary because the same =
static initializer code that you cited contains the following:
// Register all editors in our standard package
PropertyEditorManager.setEditorSearchPath(new String[] {
"sun.beans.editors",
"com.interface21.beans.propertyeditors"
});
All editors named XXXEditor in these packages get registered as editors =
for XXX automatically, like PropertiesEditor for Properties. The naming =
convention cannot be applied to String arrays, thus the explicit =
StringArrayPropertyEditor registration.
I don't understand why uncommenting the line made a difference in your =
situation. I use the web stuff a lot, and setting UrlHandlerMapping =
properties works nicely for me, without explicit PropertiesEditor =
registration. Hmmm, maybe a classloader issue?
Anyway, let me invite you to join one of our mailing lists. The project =
is now hosted at SourceForge and is called "Spring Framework":
http://sourceforge.net/projects/springframework
You could try to download a current version of the framework and recheck =
the property editor issue for your application. Unfortunately, our first =
official release 0.8 isn't out yet, so you'll need to get the stuff from =
the SourceForge CVS. FYI, 0.8 should get released in April, and 1.0 =
around end of May.
Note that the i21-web-demo accompanying the book will probably not work =
on a current Spring version without slight modifications. There have =
been major new framework features since the book version, introducing =
some incompatibilities for the sake of clearness (like new subpackages, =
renamed classes and methods, etc). AFAIK, Rod has already tried to adapt =
the demo, but it isn't in CVS yet.
Regards,
Juergen
-----Original Message-----
From: Bruno THOMAS [mailto:bt...@al...]=20
Sent: Wednesday, April 09, 2003 10:27 AM
To: ExpertJ2EE with RodJohnson
Subject: [expertj2ee_with_rodjohnson] interface21 Properties editor in
BeanWrapperImpl
Hi all,
When I deployed the i21-web-demo.war I had always an=20
ErrorCodedPropertyVetoException: errorCode=3D[typeMismatch]; =
message=3D(Failed
to=20
convert property value of type [java.lang.String] to required type=20
[java.util.Properties]
Anyway, I didn't have time to get to see what was happening, so I =
decided to
make a little demo using interface21 with a piece of webapp that I want =
to=20
migrate from struts to interface21. I've had the same exception.
After getting source with CVS and few moments in the code, I've been =
able to
see that in init of BeanWrapperImpl the line 57 :
PropertyEditorManager.registerEditor(Properties.class,PropertiesEditor.cl=
ass
);
was commented out. As the PropertiesEditor is necessary for listing of =
url=20
with the UrlHandlerMapping, I've removed the comment. After registering=20
PropertiesEditor, all worked well (the web-demo and my demo).
So why it was commented out ? Did I missed something (with for example=20
StringArrayPropertyEditor) ?
Is anybody having a clue about this ?=20
Thanks by advance.
Bruno THOMAS
PS : sorry for my poor english
---
Change your mail options at http://p2p.wrox.com/manager.asp or=20
to unsubscribe send a blank email to
lea...@p2.....
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The =
debugger=20
for complex code. Debugging C/C++ programs can leave you feeling lost =
and=20
disoriented. TotalView can help you find your way. Available on major =
UNIX=20
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|