Ticket #815 (closed defect: invalid)

Opened 8 months ago

Last modified 8 months ago

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

Change History

Changed 8 months ago by xue

  • status changed from new to closed
  • resolution set to invalid
  • milestone set to 3.1.2

Not quite sure what problem you are describing here. Could you please show me the callstack of the TNotSupportedException?

I will close it for now. Please re-open it with update.

Note: See TracTickets for help on using tickets.