Hi,
Really hoping that someone in the know reads this and responds. I'm trying to implement a Smart UI command. For my needs, I am using the open.classic.command from the Smart UI SDK sample (Content Server 21.4, btw). I'm integrating with another smart UI extension that adds a Vue dialog to the interface which I don't want to interfere with, so generating a <mymodule>-all.js file is what I'm trying to avoid.
The existing extensions work and I have them deployed in OTHome\support\<mymodule>\smartui\bundles, and I have a <mymodule>-extensions.json file in OTHome\support\<mymodule>\smartui\. The sample code came from
CSUI SDK Home\samples\commands\open.classic
I tried two approaches to this:
1) Don't use existing <mymodule>-index.json and <mymodule>-all.js
2) use the existing and add the sample code to <mymodule>-all.js and add to the list in <mymodule>-index.js
Neither approach gave me a command, but in both approaches I can see my open.classic JS files being loaded (I put console.log() statements in them both).
For the first use case, I added to my <mymodule>-extensions.json file as per the readme in the sample code folder. I then added the contents of the open.classic folder under OTHome\support\<mymodule>\smartui\commands.
For the second use case, I added the two extensions from open.classic to the <mymodule>-index.json file in the bundles directory and added the code to both to the <mymodule>-all.js file in my bundle.
In both examples, I see any console.log() statements in the Javascript that I may add, so they are being loaded in both scenarios, but the command is never being added. I even added a default enabled method to the open.classic.command.js file to so I could make it conditional. It never gets called.
So the overarching question is this: what am I missing? Assuming I'm not missing anything, is there anything missing from the sample code? Should the sample code not have an enabled method? If not, why not?
Thanks in advance
-Hugh