| Issue 206: | Unregister clientside validators from manager if container of validator becomes invisible after callback | |
| Back to list |
Sign in to add a comment
|
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 |
||||||||||||
,
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. |
|||||||||||||
,
Nov 06, 2009
Nice idea - much more elegant and more performant on the server side - thanks :D |
|||||||||||||
|
|
|||||||||||||