Walter,

That was the initial implementation, getField was returning a Date and
getFieldAsString was returning the String. In the JSP you would call the
form field 'fieldAsString'.

I don't remember exactly why, but I really had to change it because of some
side-effects too. I always disliked the fact that the field with the actual
name modeled had a different type in the generated code.

I'm sure it had something to do with the Struts validation framework not
accepting it if it wasn't a String, and because the generated validation
routines can't easily be modified I chose to do it this way

But again, I do agree with you.

Why would you need the date instance in valid when ? Are you comparing dates
or something ? Is that even possible using the '<' and '>' operators ? I
think it's better to work with the String version anyway, can you let me
know why you really want a Date ? I'm trying to understand.

-- Wouter 


> -----Original Message-----
> From: Walter Mour�o [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 22, 2005 7:17 PM
> To: Wouter Zoons
> Cc: [email protected]
> Subject: validwhen & AsDate suffix
> 
> Hi Wouter,
> 
> I saw a bad side effect of using the "AsDate" suffix in form's date type
> fields, the modeler must use "fieldAsDate" instead of "field" when using
> the validwhen validator, to get the desired validation.
> 
> I'm thinking about using the "AsString" suffix in the String version of
> the getters and setters, keeping the Date field with its original name.
> 
> What do you think ?
> 
> --------------------------------------------------------------------------
> -
> Walter Itamar Mour�o - Diretor de Tecnologia e Projetos - Arcadian S/A
> www.arcadian.com.br



-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_idh82&alloc_id148&op=click
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to