Validator with a property java.util.Date ???

2003-12-03 Thread Mauricio T. Ferraz
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

validator java.util.Date object ???

2003-12-03 Thread Mauricio T. Ferraz
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.

Validator a property java.util.Date is possible??

2003-12-03 Thread Mauricio T. Ferraz
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

Validation of a property java.util.Date is possible?

2003-12-03 Thread Mauricio T. Ferraz
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

SV: Validation of a property java.util.Date is possible?

2003-12-03 Thread Håkan Fransson
: 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

java.util.Date in a Bean/ActionForm

2003-09-10 Thread Cees van de Griend
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

RE: java.util.Date in a Bean/ActionForm

2003-09-10 Thread Matt Raible
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

java.util.date in edit form

2003-01-30 Thread Softwareentwicklung Hauschel
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

RE: java.util.date in edit form

2003-01-30 Thread Pani, Gourav
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

RE: java.util.date in edit form

2003-01-30 Thread Ritesh Singhal
[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

RE: java.util.date in edit form

2003-01-30 Thread Jarnot Voytek Contr AU HQ/SC
. -- 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

Re: java.util.Date

2002-11-07 Thread Max Kutny
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

Re: java.util.Date

2002-11-07 Thread Eddie Bush
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

Re: java.util.Date

2002-11-06 Thread Max Kutny
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

Re: java.util.Date

2002-11-06 Thread Antoni Reus
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

Re[2]: java.util.Date

2002-11-06 Thread Rick Reumann
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

Re: java.util.Date

2002-11-06 Thread Eddie Bush
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

Re[2]: java.util.Date

2002-11-06 Thread Rick Reumann
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

Re: Re[2]: java.util.Date

2002-11-06 Thread Antoni Reus
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

Re[4]: java.util.Date

2002-11-06 Thread Rick Reumann
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

Re: Re[4]: java.util.Date

2002-11-06 Thread Kris Schneider
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

Re: Re[4]: java.util.Date

2002-11-06 Thread Antoni Reus
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

Re: Re[4]: java.util.Date

2002-11-06 Thread Antoni Reus
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

Re[6]: java.util.Date

2002-11-06 Thread Rick Reumann
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

Re[6]: java.util.Date

2002-11-06 Thread Rick Reumann
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

Re: Re[6]: java.util.Date

2002-11-06 Thread Antoni Reus
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

Re: java.util.Date

2002-11-06 Thread Kris Schneider
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

Re: java.util.Date

2002-11-06 Thread Eddie Bush
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

RE: java.util.Date

2002-11-06 Thread Wendy Smoak
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

Re: java.util.Date

2002-11-06 Thread Kris Schneider
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

Re: java.util.Date

2002-11-06 Thread Eddie Bush
!!! 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

Re: java.util.Date

2002-11-06 Thread Kris Schneider
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

Re[2]: java.util.Date

2002-11-06 Thread Rick Reumann
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

java.util.Date

2002-11-04 Thread Rick Reumann
-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

Re: AW: BeanUtils.copyProperties(formBean, javaBean) not converting S trin g dates to java.util.Date dates

2002-10-19 Thread Rick Reumann
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

BeanUtils.copyProperties(formBean, javaBean) not converting String dates to java.util.Date dates

2002-10-18 Thread Clayson, Jim
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

RES: [ConvertUtils] Converter for java.util.Date

2002-10-18 Thread Elderclei R Reami
;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

[ConvertUtils] Converter for java.util.Date

2002-10-18 Thread Rick Reumann
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

AW: BeanUtils.copyProperties(formBean, javaBean) not converting Strin g dates to java.util.Date dates

2002-10-18 Thread sem . Gottofrey
(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

Am I the only one using java.util.Date?

2002-10-16 Thread Rick Reumann
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

RE: Am I the only one using java.util.Date?

2002-10-16 Thread James Higginbotham
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

Re: Am I the only one using java.util.Date?

2002-10-16 Thread kiuma
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

RE: Am I the only one using java.util.Date?

2002-10-16 Thread du Plessis, Corneil C
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

Re[2]: Am I the only one using java.util.Date?

2002-10-16 Thread Rick Reumann
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

RE: Re[2]: Am I the only one using java.util.Date?

2002-10-16 Thread James Higginbotham
! 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

Re: Am I the only one using java.util.Date?

2002-10-16 Thread Brian Hickey
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

RE: Am I the only one using java.util.Date?

2002-10-16 Thread Padma Ginnaram
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

Re[4]: Am I the only one using java.util.Date?

2002-10-16 Thread Rick Reumann
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

Re[2]: Am I the only one using java.util.Date?

2002-10-16 Thread Rick Reumann
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

RE: Re[4]: Am I the only one using java.util.Date?

2002-10-16 Thread James Higginbotham
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

RES: Re[4]: BeanUtils and java.util.Date

2002-10-16 Thread Elderclei R Reami
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

Re: RES: Re[4]: BeanUtils and java.util.Date

2002-10-16 Thread Rick Reumann
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

RES: RES: Re[4]: BeanUtils and java.util.Date

2002-10-16 Thread Elderclei R Reami
: 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

Re[4]: BeanUtils and java.util.Date

2002-10-16 Thread Rick Reumann
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

RE: java.util.Date parameters...

2002-02-26 Thread Jesse Alexander (KADA 12)
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

RE: what will happen if I have Data Types other than java.lang.String in my formbean - say java.util.date?

2002-02-09 Thread Krueger, Jeff
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

what will happen if I have Data Types other than java.lang.String in my formbean - say java.util.date?

2002-02-08 Thread Kevin Wang
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

java.util.Date properties

2001-08-09 Thread Nathan Coast
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