My favorites | Sign in
Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 206: Unregister clientside validators from manager if container of validator becomes invisible after callback
  Back to list
Status:  Accepted
Owner:  godzill...@gmx.net
Type-Defect
Priority-Medium
Milestone-3.2a
Component-UI


Sign in to add a comment
 
Reported by godzill...@gmx.net, Nov 04, 2009
What steps will reproduce the problem?
- add TValidationSummary to TActivePanel
- add TPanel to TActivePanel
- add TTextBox & TRequiredFieldValidator to TPanel
- add TActiveLinkButton with CausesValidation=true to TActivePanel
- add TActiveLinkButton with CausesValidation=false to TActivePanel

- click TActiveLinkButton with CausesValidation=true => TValidationSummary
will be displayed
- click TActiveLinkButton with CausesValidation=false and set
TPanel.Visibile=false on callback

What is the expected output?
No validation message is displayed

What do you see instead?
Validation message is shown.

Solution:
Unregister clientside validators from manager if container of validator
becomes invisible after callback
Comment 1 by google...@pcforum.hu, Nov 05, 2009
It would be probably easier to do the opposite, ie. ask the client side manager / 
registry itself - after an update - to validate each and every validator it has 
registered. This could be done by forcing each rendered and active validator to emit 
a <span> with a unique id in-place into the page code, and then asking the registry 
to look up the id's of each of it's registered validator in the DOM. If it can't 
find any elements with the specified id, it should dispose of the validator 
previously registered into it, as the validator is no more part of the page (or is 
disabled).

Just an idea.
Comment 2 by godzill...@gmx.net, Nov 06, 2009
Nice idea - much more elegant and more performant on the server side - thanks :D
Sign in to add a comment

Hosted by Google Code