Project

General

Profile

Actions

Feature #2051

open

Wt::WItemDelegate validation

Added by Saif Rehman almost 11 years ago. Updated almost 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/20/2013
Due date:
% Done:

0%

Estimated time:

Description

There should be a method to accept validator and Wt::WItemDelegate::doCloseEditor() should check the validator before saving the data.

Actions #1

Updated by Wim Dumon almost 11 years ago

It sounds sensible to have something that combines validators and the MVC system of Wt.

We were thinking of maybe adding a ValidationRole to the model, and checking that validator in WItemDelegate. Any other ideas? Do you know if other toolkits (Qt?) have such support built-in?

Wim.

Actions #2

Updated by Saif Rehman almost 11 years ago

I don't have any experience with any other toolkit. However I do believe your validationRole approach may be the best solution since the programmer has the most choice even on providing different validation for each row and column.

I have another suggestion. Maybe Wt could check the data type which has been set for a display/edit role field and automatically adding a validator for the type. Like int data would have WIntValidation and so on.

Actions

Also available in: Atom PDF