I would like to ask people with more knowledge about the framework what's the best way to go about doing the following (using the JS client only).
I would like to extend the built in objects (such as buttons, windows, etc) so I can add some rights management properties. For example, I would like to add a property "groupNames" to explicitly list the names of the access groups who can see that object.
I know how to do this by deriving another object from the built in objects, that is quite simple to achieve. What I wonder is is it's possible to extend the built in objects without deriving new objects (so we don't end up with our own naming for half of the framework just for adding a property and some logic).
Is this achievable, or not recommended? If achievable, how would one go about doing it?
What I tried to do is use addProperties to overwrite the initWidget function, perform my validation, and then call this.Super. As expected, this ended up messing up things, as (to my understanding) it is just overwriting the normal implementation of the method.
Thanks,
Sorin
I would like to extend the built in objects (such as buttons, windows, etc) so I can add some rights management properties. For example, I would like to add a property "groupNames" to explicitly list the names of the access groups who can see that object.
I know how to do this by deriving another object from the built in objects, that is quite simple to achieve. What I wonder is is it's possible to extend the built in objects without deriving new objects (so we don't end up with our own naming for half of the framework just for adding a property and some logic).
Is this achievable, or not recommended? If achievable, how would one go about doing it?
What I tried to do is use addProperties to overwrite the initWidget function, perform my validation, and then call this.Super. As expected, this ended up messing up things, as (to my understanding) it is just overwriting the normal implementation of the method.
Thanks,
Sorin
Comment