[MAGNOLIA-1417] Failed dialog validation should not save/close the dialog Created: 01/Mar/07  Updated: 23/Jan/13  Resolved: 06/Jun/07

Status: Closed
Project: Magnolia
Component/s: gui
Affects Version/s: 3.0.1
Fix Version/s: 3.0.3, 3.1 M2

Type: Bug Priority: Major
Reporter: Magnolia International Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File MAGNOLIA-1417.patch    
Issue Links:
supersession
supersedes MAGNOLIA-1361 validation check for missing required... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Currently, dialog controls marked as required can still be empty.
Patches have been provided by MAGNOLIA-1119 and MAGNOLIA-1361 and are summarized/improved in the attached patch.

One of the problems with these patches is that the validation code was called during rendering: as a result mandatory fields were immediately marked "red", and the user did not have any indication of what was wrong anymore after a failed validation, since nothing changed visually. It also removed the alert box, which while not being the most sexy device was a way of saying to the user that something was wrong. (if the missing required field was in another tab, the user would just see nothing)
To fix this, I introduced the "wasValidatedOrNotSaved" field in DialogControlImpl.

Another problem is that a file control would loose its file upon failed validation and the user would thus have to reselect and reupload it. while that's viable with simple dialogs, it is not in more complex scenarios where multiple files are involved.



 Comments   
Comment by Philipp Bracher [ 31/May/07 ]

I fixed it in a simple way:

  • required field works
  • binaries are checked
  • alert is showed (only the first invalid field)
  • you have to select the binaries again
  • tab is not switched
  • label is not red

Means it is working, but we need a better solution. This will be part of the dialog refactoring.

Comment by Philipp Bracher [ 06/Jun/07 ]

apply simple patch from 3.1 in 3.0 branch

Comment by Philipp Bracher [ 06/Jun/07 ]

applied to 3.0.3

Generated at Mon Feb 12 03:26:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.