I am implementing a ribbon tool bar button for component view.
When I click in the RTF field the button will be enabled. When I click on the button it will open a aspx page. When the aspx page is opened the corresponding JavaScript should initialize by default. But in my case it is not happening.
I have given common names to the JavaScript and aspx page. Please suggest how to debug this problem and get a solution.
Are you saying that your JavaScript file doesn't get included at all?
Or that the "initialize" method isn't getting called?
If it's the former, you should look at your dependencies. Normally you would have a group in your Editor configuration file which includes the .js file and optionally a .css file as well. You would then include a dependency on this group in your .aspx.cs file, by including a ControlResources attribute (passing in the name of the group).
If the problem is that your "initialize" method isn't being called, you should check if you are registering the view (e.g. calling $display.registerView(FullNameOfYourClassIncludingNamespce)
at the bottom of your JavaScript file)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With