We are preparing to move this Jira installation to codehaus. Please wait and don't use this version for some days.

The AndroMDA project

Server side date and time validation are ignored

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Bpm4Struts Cartridge
  • Labels:
    None

Description

There's a bug in the server side date validation...what happens is that when you convert the date to a string on the form, you already format the date or the string gets set to null if there is an error parsing it by the date formatter; this means that when the server side validator kicks in, the date string is already null, therefore it can't validate it.

Issue Links

Activity

Hide
Wouter Zoons added a comment - 18/Jul/05 6:48 AM
just in order for me not to lose too much time: what would be a good way to fix this, what strategy ? if the date/time can't be parsed then to what should I set the form field value ?
Show
Wouter Zoons added a comment - 18/Jul/05 6:48 AM just in order for me not to lose too much time: what would be a good way to fix this, what strategy ? if the date/time can't be parsed then to what should I set the form field value ?
Hide
Walter Itamar Mourão added a comment - 18/Jul/05 1:44 PM
I just commented about a similar question in BPM-218 and I suggest using the same solution. Also I suggest start using java.sql.Time, java.sql.Date and java.sql.Timestamp, instead of strings, in forms.
Show
Walter Itamar Mourão added a comment - 18/Jul/05 1:44 PM I just commented about a similar question in BPM-218 and I suggest using the same solution. Also I suggest start using java.sql.Time, java.sql.Date and java.sql.Timestamp, instead of strings, in forms.
Hide
Wouter Zoons added a comment - 21/Jul/05 1:03 AM
like I already explained: we cannot rely on the usage of Dates only because this would render the client-side validation completely useless .. the validation framework requires us to use String instances

I used to work with Dates only until I noticed it was breaking things, I allow both String and Date return types
Show
Wouter Zoons added a comment - 21/Jul/05 1:03 AM like I already explained: we cannot rely on the usage of Dates only because this would render the client-side validation completely useless .. the validation framework requires us to use String instances I used to work with Dates only until I noticed it was breaking things, I allow both String and Date return types
Hide
Walter Itamar Mourão added a comment - 21/Jul/05 3:24 PM
>>like I already explained: we cannot rely on the usage of Dates only
>> because this would render the client-side validation completely
>>useless .. the validation framework requires us to use String instances

It's not true. I thought this way too, but now I know we can use any type in forms, since we configure the (apache commons) converters and (sometimes) do some customization in the validator. Sometime ago I sent you a small project working with dates and times in forms, with the client (and server) validation working fine.

Show
Walter Itamar Mourão added a comment - 21/Jul/05 3:24 PM >>like I already explained: we cannot rely on the usage of Dates only >> because this would render the client-side validation completely >>useless .. the validation framework requires us to use String instances It's not true. I thought this way too, but now I know we can use any type in forms, since we configure the (apache commons) converters and (sometimes) do some customization in the validator. Sometime ago I sent you a small project working with dates and times in forms, with the client (and server) validation working fine.
Hide
Wouter Zoons added a comment - 21/Jul/05 3:42 PM
yeah that's true .. you're talking about BPM-171, but the thing there is that it requires lots of customization

I'll see what I can do to get it to work
Show
Wouter Zoons added a comment - 21/Jul/05 3:42 PM yeah that's true .. you're talking about BPM-171, but the thing there is that it requires lots of customization I'll see what I can do to get it to work

People

Vote (2)
Watch (1)

Dates

  • Created:
    27/Jun/05 10:16 PM
    Updated:
    13/Aug/11 11:58 AM