Project

General

Profile

Bug #5353

Widget Gallery "Integration example" has some issues with validation

Added by Bruce Toll almost 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/19/2016
Due date:
% Done:

0%

Estimated time:

Description

With github wt 3.3.6-6-gbadb151, the Widget Gallery "Integration example" exhibits some validation-related problems, particularly when JavaScript is not available.

  1. Attempting to save an invalid input in the "Birth date" field, e.g. "not-a-date" results in the message "This field cannot be empty" - when the displayed field is not empty. As a consequence, there is no ability to view more useful validation messages that describe the expected input format.
  2. Without JavaScript, attempting to save invalid values in the "Children" field results in replacement with a prior integer value, e.g. an initial input value of "yes" gets changed to "0" when "Save" is clicked. If "10" has previously been accepted, an attempt to change it to "12.7" will result in the value updating to "10".
  3. Without JavaScript, there is no way to set the City. Setting a "Country" and pressing "Save" does not refresh the "City" combo box.

Attached, for your review, is a patch that is intended to address the above issues.

Also, for your review, are two related patches that modify the "Integration example" to take advantage of additional C++11 features and the block function. These two patches are independent and intended to be applied in addition to the first patch. NOTE: The third patch is an alternative way of addressing issue #5348. Other than that, the latter two patches are not intended to alter functionality. Please feel free to incorporate any portions you think are helpful. There are additional comments in the patch files.


Files

#1

Updated by Bruce Toll almost 6 years ago

There is an error in the attached 0003-Minor-improvements-to-Integration-Example-part-2.patch, with respect to the label field. A corrected version has been attached as 0004-Minor-improvements-to-Integration-Example-part-2v2.patch.

Also available in: Atom PDF