-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternate loading algorithm to load personalized base classess #566
Comments
Can you be more precise on what you're trying to achieve? in the past we added some facilities like that on other classes, from simple method overloading to full-blown adapter classes. |
These are minor modifications and I can sort them out. But I wonder if there is a more elegant solution... |
By calling this: Furthermore, this is a use case for behaviors. TBaseValidator.php changes:
and then your new class:
and somewhere in the code -before dealing with the templates- this would be called:
Then all your TBaseValidators would contain the necessary behavior as they are instanced. |
Another way:
along with |
Another change to TBaseValidator:
This would allow behaviors to modify the default ForeColor. The Class behaviors are added in the __construct method; then the dyDefaultForeColor overrides the input:
There may be more necessary to get the Validators on CSS rather than a ForeColor. More looking into the issue would be needed. |
I don't know if it is a good idea. Let me explain my problem:
I would like to personalize the validators classes a bit. My main problem is that I have to modify TBaseValidator. As this is the base class for all Validators webcontrols, it will forced me modify all of them.
Instead of doing this, I would like the following:
To achieve this, I think the appropriate point would be to modify PradoBase::using method. There should be a way to inform this method that when asked to load System.Web.UI.Webcontrols.TBaseValidator --> to load my copy at Application.Common.TBaseValidator
The text was updated successfully, but these errors were encountered: