You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Steve Gibson <St...@cowww.com> on 2004/11/03 16:17:16 UTC
RE: [SPAM] - set a java.lang.Integer inside a construct element - Email has different SMTP TO: and MIME TO: fields in the email addresses
Taken from the javadocs for java.beans.ProperttEditorManager
Default PropertyEditors will be provided for the Java primitive types
"boolean", "byte", "short", "int", "long", "float", and "double"; and
for the classes java.lang.String. java.awt.Color, and java.awt.Font.
Steve Gibson
-----Original Message-----
From: David J. M. Karlsen [mailto:david@davidkarlsen.com]
Sent: Wednesday, November 03, 2004 10:12 AM
To: hivemind-user@jakarta.apache.org
Subject: [SPAM] - set a java.lang.Integer inside a construct element -
Email has different SMTP TO: and MIME TO: fields in the email addresses
I use an invoke-factory, with a construct element inside, which contains
several <set property="someProp" value="someValue"/>
mostly Strings, but also a java.lang.Integer.
but the Integer conversion fails (value="1252") to convert:
org.apache.hivemind.ApplicationRuntimeException: Unable to translate
'1252' to type java.lang.Integer: No property editor for
java.lang.Integer.
surely there ought to be a converter to Integer?
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
Re: [SPAM] - set a java.lang.Integer inside a construct element -
Email has different SMTP TO: and MIME TO: fields in the email addresses
Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
Howard Lewis Ship wrote:
>Something of a personal belief for me, that HiveMind should just work
>through public APIs and not side-step things. Yes, HiveMind could
>pretty easily jump in an fiddle with instance variables, it could even
>guess the naming convention you use ... but the cost of adding one or
>two accessors per class is not what I'd call painful.
>
>
Just asking - sometimes I wanna be quick && dirty when I prototype (and
why not hardcode then) :-)
But it's probably a good idea not to support it :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
Re: [SPAM] - set a java.lang.Integer inside a construct element - Email has different SMTP TO: and MIME TO: fields in the email addresses
Posted by Howard Lewis Ship <hl...@gmail.com>.
Something of a personal belief for me, that HiveMind should just work
through public APIs and not side-step things. Yes, HiveMind could
pretty easily jump in an fiddle with instance variables, it could even
guess the naming convention you use ... but the cost of adding one or
two accessors per class is not what I'd call painful.
On Wed, 03 Nov 2004 21:41:37 +0100, David J. M. Karlsen
<da...@davidkarlsen.com> wrote:
> James Carman wrote:
>
>
>
> >There may not. We ran into this problem before with the java.lang.String
> >type within a Java Web Start client. There's a bug out there in JIRA for it
> >and I provided the patch which fixed it. My suggestion was to use the
> >commons beanutils classes rather than the property editors, but we want to
> >minimize the dependencies HiveMind has (aside from Javassist, obviously), so
> >we're sticking with the core JDK classes. We basically short-circuited the
> >property editor lookup if the target property type was String (as converting
> >String to String is somewhat trivial). Are you running within a webstart
> >client?
> >
> >
> No - it's running inside a EJB-container.
> Not a big problem as I can do a
>
> public void setSomeprop(int valueProvidedFromHiveMindFW){
> theClassIntegerProp = new Integer(valueProvidedFromHiveMindFW);
> }
>
> BTW: For the automatic-setting to be done - I have to provide
> setPropertyname methods? Do they absolutely have to be public void and
> not not private and/or static?
> HiveMind cannot locate the variables of itself and initialize them?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
Re: [SPAM] - set a java.lang.Integer inside a construct element -
Email has different SMTP TO: and MIME TO: fields in the email addresses
Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
James Carman wrote:
>There may not. We ran into this problem before with the java.lang.String
>type within a Java Web Start client. There's a bug out there in JIRA for it
>and I provided the patch which fixed it. My suggestion was to use the
>commons beanutils classes rather than the property editors, but we want to
>minimize the dependencies HiveMind has (aside from Javassist, obviously), so
>we're sticking with the core JDK classes. We basically short-circuited the
>property editor lookup if the target property type was String (as converting
>String to String is somewhat trivial). Are you running within a webstart
>client?
>
>
No - it's running inside a EJB-container.
Not a big problem as I can do a
public void setSomeprop(int valueProvidedFromHiveMindFW){
theClassIntegerProp = new Integer(valueProvidedFromHiveMindFW);
}
BTW: For the automatic-setting to be done - I have to provide
setPropertyname methods? Do they absolutely have to be public void and
not not private and/or static?
HiveMind cannot locate the variables of itself and initialize them?
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
RE: [SPAM] - set a java.lang.Integer inside a construct element - Email has different SMTP TO: and MIME TO: fields in the email addresses
Posted by James Carman <ja...@carmanconsulting.com>.
There may not. We ran into this problem before with the java.lang.String
type within a Java Web Start client. There's a bug out there in JIRA for it
and I provided the patch which fixed it. My suggestion was to use the
commons beanutils classes rather than the property editors, but we want to
minimize the dependencies HiveMind has (aside from Javassist, obviously), so
we're sticking with the core JDK classes. We basically short-circuited the
property editor lookup if the target property type was String (as converting
String to String is somewhat trivial). Are you running within a webstart
client?
-----Original Message-----
From: Steve Gibson [mailto:Steve.Gibson@cowww.com]
Sent: Wednesday, November 03, 2004 10:17 AM
To: hivemind-user@jakarta.apache.org
Subject: RE: [SPAM] - set a java.lang.Integer inside a construct element -
Email has different SMTP TO: and MIME TO: fields in the email addresses
Taken from the javadocs for java.beans.ProperttEditorManager
Default PropertyEditors will be provided for the Java primitive types
"boolean", "byte", "short", "int", "long", "float", and "double"; and
for the classes java.lang.String. java.awt.Color, and java.awt.Font.
Steve Gibson
-----Original Message-----
From: David J. M. Karlsen [mailto:david@davidkarlsen.com]
Sent: Wednesday, November 03, 2004 10:12 AM
To: hivemind-user@jakarta.apache.org
Subject: [SPAM] - set a java.lang.Integer inside a construct element -
Email has different SMTP TO: and MIME TO: fields in the email addresses
I use an invoke-factory, with a construct element inside, which contains
several <set property="someProp" value="someValue"/>
mostly Strings, but also a java.lang.Integer.
but the Integer conversion fails (value="1252") to convert:
org.apache.hivemind.ApplicationRuntimeException: Unable to translate
'1252' to type java.lang.Integer: No property editor for
java.lang.Integer.
surely there ought to be a converter to Integer?
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org