In my Form a
hava a property java.util.Date, I can use the validator Struts?Or I just can
have properties "Strings" ??? in my textfiels on form???In the Struts'
webapps has a example, the use only String to input ofdata...I
gotjava.lang.IllegalArgumentException: arg
In my Form a hava a property java.util.Date, I can use the validator Struts?
Or I just can have properties Strings ??? in my textfiels on form???
In the Struts' webapps has a example, the use only String to input of data...
Thanks, for help.
In my Form a hava a property java.util.Date, I can use the validator Struts?
Or I just can have properties Strings ??? in my textfiels on form???
In the Struts' webapps has a example, the use only String to input of
data...
I got
java.lang.IllegalArgumentException: argument type mismatch
In my Form a have a property java.util.Date, I can validate it ?
Or I just can have properties Strings ??? in my textfiels on form???
I can map a textfield of a Form HTML to a property java.util.Date of a JavaBean ???
How can I do it?
I got
java.lang.IllegalArgumentException: argument type
: den 3 december 2003 12:25
Till: Struts Users Mailing List
Ämne: Validation of a property java.util.Date is possible?
In my Form a have a property java.util.Date, I can validate it ?
Or I just can have properties Strings ??? in my textfiels on form???
I can map a textfield of a Form HTML
L.S.
I'm new at Struts, but I got it working.
I've an simple Bean with a java.util.Date property and the set and get methods
with to set/get the java.util.Date values. I've an (almost) working
ActionForm with the same properties.
In a Action I use somthing like
Subject: java.util.Date in a Bean/ActionForm
L.S.
I'm new at Struts, but I got it working.
I've an simple Bean with a java.util.Date property and the set and get
methods
with to set/get the java.util.Date values. I've an (almost) working
ActionForm with the same properties.
In a Action I use
Hey all,
i've got an edit form, where i have to input a date.
In my Form.java class the matching properties type is java.util.Date.
But there ist an error submitting the form - ServletException:
BeanUtils.populate
If i delete the date Field, the form/action works ;-(
How can i input a date
for the person using the application.
-Original Message-
From: Softwareentwicklung Hauschel
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 9:57 AM
To: Struts Users Mailing List
Subject: java.util.date in edit form
Hey all,
i've got an edit form, where i have to input a date
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 8:27 PM
To: Struts Users Mailing List
Subject: java.util.date in edit form
Hey all,
i've got an edit form, where i have to input a date.
In my Form.java class the matching properties type is java.util.Date.
But there ist an error
.
--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.
-Original Message-
From: Softwareentwicklung Hauschel
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 30, 2003 8:57 AM
To: Struts Users Mailing List
Subject: java.util.date in edit form
Hey all,
i've got an edit form
EB from javadoc on SimpleDateFormat: Synchronization
EB Date formats are not synchronized. It is recommended to create
EB separate format instances for each thread. If multiple threads access
EB a format concurrently, it must be synchronized externally.
EB ... so your concern is quite
I don't think it's your fault, Max. The docs should talk about that
internal Calendar instance. Knowing things like that .oO( Hrm ... if it
just has a single internal Calendar instance, it's probably doing
modification to it on-the-fly ...) is quite important! If the only
thing involved
RR I'm posting this with a different subject line so it will hopefully
RR come up in the archives if someone needs to search for it.
RR public class DateBeanUtilsConverter implements Converter {
RR private String formatPattern = null;
RR public void setFormatPattern(String
Hi,
see below ...
A Dimecres 06 Novembre 2002 11:29, Max Kutny va escriure:
RR I'm posting this with a different subject line so it will hopefully
RR come up in the archives if someone needs to search for it.
RR public class DateBeanUtilsConverter implements Converter {
RR private
On Wednesday, November 6, 2002, 3:21:28 PM, Antoni wrote:
AR Keep in mind that DateFormat (and SimpleDateFormat) is not thread safe so you
AR have to be very careful when reusing them.
I like Max's suggestion though. I think I will move it to the
setFormatPattern for sure. Correct
static blocks are run with the class - right? So it's really irrelevant
how many instances get created - that code is run a maximum of one time
- when the class is first loaded.
Am I wrong?
Rick Reumann wrote:
On Wednesday, November 6, 2002, 3:21:28 PM, Antoni wrote:
AR Keep in mind that
On Wednesday, November 6, 2002, 4:47:32 PM, Eddie wrote:
EB static blocks are run with the class - right? So it's really
EB irrelevant how many instances get created - that code is run a
EB maximum of one time - when the class is first loaded.
EB Am I wrong?
Right that's what I was
Hi, I don't speak english very very well, so this is a bit difficult for me to
explain, but I'll try ;-)
see below ...
A Dimecres 06 Novembre 2002 21:37, Rick Reumann va escriure:
On Wednesday, November 6, 2002, 3:21:28 PM, Antoni wrote:
AR Keep in mind that DateFormat (and
On Wednesday, November 6, 2002, 4:05:45 PM, Antoni wrote:
AR Hi, I don't speak english very very well, so this is a bit
AR difficult for me to explain, but I'll try ;-)
No problem. Most American's don't speak English very well
(including myself I'm sure:)
AR I have'nt looked at
Apologies if I'm misinterpreting, but I think Antoni's concern is that the
SimpleDateFormat's parse and format methods are not thread-safe. The creation
of the converters and their registration can obviously be accomplished in a
thread-safe manner, but if multiple threads call into parse and/or
A Dimecres 06 Novembre 2002 22:19, Rick Reumann va escriure:
On Wednesday, November 6, 2002, 4:05:45 PM, Antoni wrote:
AR Hi, I don't speak english very very well, so this is a bit
AR difficult for me to explain, but I'll try ;-)
No problem. Most American's don't speak English very
Hi,
A Dimecres 06 Novembre 2002 22:31, Kris Schneider va escriure:
Apologies if I'm misinterpreting, but I think Antoni's concern is that the
SimpleDateFormat's parse and format methods are not thread-safe. The
creation of the converters and their registration can obviously be
accomplished in
On Wednesday, November 6, 2002, 4:51:58 PM, Antoni wrote:
AR The problem is that during execution of SimpleDateFormat.parse some private
AR fields of SimpleDateFormat are modified.
A yes thank you. I bet I have this problem in other pieces of
my code as well. What would you
On Wednesday, November 6, 2002, 4:31:09 PM, Kris wrote:
KS The creation of the converters and their registration can
KS obviously be accomplished in a thread-safe manner, but if multiple
KS threads call into parse and/or format at the same time, this will
KS cause a problem. If that's not what
A Dimecres 06 Novembre 2002 22:55, Rick Reumann va escriure:
On Wednesday, November 6, 2002, 4:51:58 PM, Antoni wrote:
AR The problem is that during execution of SimpleDateFormat.parse some
private AR fields of SimpleDateFormat are modified.
A yes thank you. I bet I have this problem
All I meant was that there's a similarity between a single Action instance
having multiple threads comcurrently invoke its execute/perform method and a
single Converter instance having multiple threads concurrently invoke its
convert method. Same deal with a single HttpServlet instance having
from javadoc on SimpleDateFormat:
Synchronization
Date formats are not synchronized. It is recommended to create separate
format instances for each thread. If multiple threads access a format
concurrently, it must be synchronized externally.
... so your concern is quite valid ... kind
Several have asked about using BeanUtils.copyProperties when you are
dealing with Dates. The default copyProperties works fine if you are
uisng java.sql.Date but not if you want to use java.util.Date.
Rick, thanks for posting this! I almost missed it, but caught Max's reply.
You say
But the thread-safety issue really *is* with the parse and format
methods. The problem is that SimpleDateFormat uses a protected Calendar
instance field (inherited from DateFormat) to maintain state specific to
an invocation of both parse and format. So, multiple concurrent threads
entering the
!!! Gotcha! Ok - I can see where that might pose a serious issue!
Sorry for being stubborn :-)
Kris Schneider wrote:
But the thread-safety issue really *is* with the parse and format
methods. The problem is that SimpleDateFormat uses a protected Calendar
instance field (inherited from
No problem - it's all Rick and Antoni's fault anyway for bringing it up
:-D.
Eddie Bush wrote:
!!! Gotcha! Ok - I can see where that might pose a serious issue!
Sorry for being stubborn :-)
Kris Schneider wrote:
But the thread-safety issue really *is* with the parse and format
On Wednesday, November 6, 2002, 6:51:22 PM, Wendy Smoak wrote:
WS Rick, thanks for posting this! I almost missed it, but caught Max's reply.
WS You say that the default BeanUtils.copyProperties works fie with
WS java.sql.Date, but I find that I still have a problem unless the user types
WS in
-write:
Several have asked about using BeanUtils.copyProperties when you are
dealing with Dates. The default copyProperties works fine if you are
uisng java.sql.Date but not if you want to use java.util.Date.
The solution appears to create two custom converters that you can
reuse throughout your
Hi,
Struts1.1b2: BeanUtils.copyProperties(formBean, javaBean) not
converting
String properties into Dates:
It will not covert them into java.util.Date. You need to create a
Converter class to do it an register it. I just went through all
this with Eldercle who posted
Hi,
Struts1.1b2: BeanUtils.copyProperties(formBean, javaBean) not converting
String properties into Dates:
I am trying to figure out what is wrong with what I am doing. I have a form
bean with date string properties (from and to) which I would like to copy
into a javabean class. When I print out
;reumann.net]
Enviada em: quinta-feira, 17 de outubro de 2002 13:23
Para: Elderclei R Reami
Cc: Struts List
Assunto: [ConvertUtils] Converter for java.util.Date
Hey Elder,
(posting this to Struts list as well in case anyone else finds it
useful while digging through the archives)
I modified the code
with a default format, but I
want to be forced to provide one). I still haven't gotten around to
actually modifying the StringConverter class to handle the other
direction (String to java.util.Date) to avoid having to register the
extra custom StringConverter class below. I'll get around to it some
(formBean, javaBean) not converting
Strin g dates to java.util.Date dates
Hi,
Struts1.1b2: BeanUtils.copyProperties(formBean, javaBean) not
converting
String properties into Dates:
I am trying to figure out what is wrong with what I am doing.
I have a form
bean with date string
My business layer bean has a field as java.util.Date (example:
birthDate). My form bean uses the String for this date (in this
example.. String birthDate). The problem is I can't seem to use
BeanUtils to copy the properties since it appears BeanUtils will only
convert a java.sql.Date by default
List
Subject: Am I the only one using java.util.Date?
My business layer bean has a field as java.util.Date
(example: birthDate). My form bean uses the String for this
date (in this example.. String birthDate). The problem is I
can't seem to use BeanUtils to copy the properties since
Since I'm connected to jboss
I use java.sql.Date.
Then I pass values in millis and use a GregorianCalendar to manage dates.
Rick Reumann wrote:
My business layer bean has a field as java.util.Date (example:
birthDate). My form bean uses the String for this date (in this
example.. String
java.util.Date?
My business layer bean has a field as java.util.Date (example:
birthDate). My form bean uses the String for this date (in this
example.. String birthDate). The problem is I can't seem to use
BeanUtils to copy the properties since it appears BeanUtils will only
convert
On Wednesday, October 16, 2002, 12:28:15 PM, James wrote:
JH If you search the list archives at www.mail-archive.com, I think
JH you will find your question answered. Pappa Struts (Craig)
JH answered it, as did other folks.
Can you please show me where this is the case?
Before my
!
James
-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 11:59 AM
To: James Higginbotham
Cc: Struts Users Mailing List
Subject: Re[2]: Am I the only one using java.util.Date?
On Wednesday, October 16, 2002, 12:28:15 PM, James
new GregorianCalendar( this.getStartYear(), this.getStartMonth()-1,
this.getStartDay() );
}
This getter (exists in the same form instance) will hand off the startDate
as a java.util.Date to your (dyn)Action.
HTH
Brian
- Original Message -
From: Rick Reumann [EMAIL PROTECTED]
To: Struts
If you are using struts 1.1 and validator framework,
StrutsValidator.validateDate converts the string to a java.util.Date and
returns this Date. This returned value gets saved on the validationResults
in the ValidatorForm.
ValidatorForm.getResultValueMap() returns a HashMap containing
in that thread. That thread does
not answer the question. It deals with java.sql.Date not
java.util.Date and yes Craig does mention about custom Converters
but I'm wondering if others have done that as their solution for
dealing with java.util.Date and BeanUtils, etc.
--
Rick
mailto
their String
versions of Dates into the correct Data type in their business bean
and use BeanUtils also. (I know BeanUtils converts
java.sql.Date but I'm wondering if others are using java.util.Date
and if so how are they handling usiing
BeanUtils.copyProperties(.. )... are they creating
James, I posted myself many times in that thread. That thread does
not answer the question. It deals with java.sql.Date not
java.util.Date and yes Craig does mention about custom Converters
but I'm wondering if others have done that as their solution for
dealing
Hi guys,
I am also using java.util.Date in my current project, and I have the same
conversion problems as you. I've just written a
piece-of-code-like-hell-no-design-no-thinking Date converters. Of course,
I'm not using them yet, because the code is horrible, but we could polish it
together. Add
On Wednesday, October 16, 2002, 5:54:50 PM, Elderclei wrote:
ERR Here is the horrible piece of code for the converters:
Hi. I can get a nice Date converter to work but how can you use
BeanUtils to go the other way -converting your business bean
java.util.Date to a String
: Elderclei R Reami
Cc: Struts List
Assunto: Re: RES: Re[4]: BeanUtils and java.util.Date
On Wednesday, October 16, 2002, 5:54:50 PM, Elderclei wrote:
ERR Here is the horrible piece of code for the converters:
Hi. I can get a nice Date converter to work but how can you use
BeanUtils
On Wednesday, October 16, 2002, 7:06:45 PM, Elderclei R Reami wrote:
ERR That's why I include the horrible if statement in
ERR StringConverterDateDecorator.
ERR if (type==String.class value.getClass()==Date.class)
ERR {
ERR /* do
separates the
layers
-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]]
Sent: Montag, 11. Februar 2002 22:28
To: Struts Users Mailing List
Subject: Re: java.util.Date parameters...
My point was that the business logic should not have to deal with Strings
just because Struts can't
have Data Types other than
java.lang.String in my formbean - say java.util.date?
I have a formbean which include a field its type is java.util.Date, and I
have two methods to get and set
like these :
Date getMyField() { return dateVar; }
void setMyField(Date date
I have a formbean which include a field its type is java.util.Date, and I
have two methods to get and set
like these :
Date getMyField() { return dateVar; }
void setMyField(Date date ){ dateVar = date ;}
Now I use html:text to display this field, it displays
Hi,
We've got a number of forms in which it would be useful to have
java.util.Date properties. Is there any plan to have conversions for data
types other than the standard java.lang basic type wrappers?
from Convert Utils
if (clazz == stringClass) {
if (value == null
58 matches
Mail list logo