Ticket #815 (closed defect: invalid)
Creating TRepeater in TCompositeControl
| Reported by: | jake | Owned by: | xue |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.2 |
| Component: | Prado Framework v3 | Version: | 3.1 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Hello,
I created my own custom file upload box which I extended from the TFileUpload class so its pretty much the same except that I needed to add a hidden field for the APC spec but now I get the TNotSupportedException when trying to use a TRequiredFieldValidator to make sure a file was selected.
I think this will be an issue for most of us who extend existing controls to give them a little more support for our specific needs. A better solution other than breaking the page would probably be checking if the control is still an instance of Foo then support it...
For example, I extended TFileUpload as TAPCUpload so to check what it is maybe you guys could do :: if ($control instanceof TFileUpload) { ... code ... } :: instead of breaking it by using get_class($control) because that will return back the class that the control is created from.
I think if we check to make sure a control is extended from one of the framework controls using 'instanceof' then it will be safe to do the regular javascript and server side validation checking and it should only break if the control does not extend an existing control.
What do you guys think?
- Jake
