How to add valdation to a webgrid?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to add valdation to a webgrid?

FDominicus
I wonder how I add validation to a webgrid. Take as example this:
ID, Date

now Date should be treated as Date how can I enforce that in a WebGrid?

Regards
Friedrich



--
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: How to add valdation to a webgrid?

Janko Mivšek
On 07. 12. 2010 08:55, Friedrich Dominicus wrote:
> I wonder how I add validation to a webgrid. Take as example this:
> ID, Date
>
> now Date should be treated as Date how can I enforce that in a WebGrid?

Add fields with #column:addBlock: instead, like:

        column: 2 addBlock: [:object |
          field := WebInputField aspect: #date for: object.
          field validIfTrue: [:value | "validate date here"].
          field].

Best regards
Janko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida