Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. import 'dart:js' as js;
  2.  
  3. // Tool-specific configuration settings
  4. // Create a const variable for each configuration entry in the tool.
  5. // The name provided to each jsContextBridge should match the XML tag name that will be expected by the engine plugin.
  6. // The names here should also match the names in index.html.
  7. const Server = jsContextBridge('Server');
  8. const Username = jsContextBridge('Username');
  9. const Password = jsContextBridge('Password');
  10. const Site = jsContextBridge('Site');
  11. const Project = jsContextBridge('Project');
  12. const UploadFile = jsContextBridge('UploadFile');
  13.  
  14.  
  15. // Needed for all tools
  16. class jsContextBridge {
  17. const jsContextBridge(this.ayxConfigKey);
  18.  
  19. final String ayxConfigKey;
  20.  
  21. String Get(){
  22. String value = js.context["Alteryx"]["Gui"]["Manager"].callMethod('getDataItem', [ayxConfigKey]).callMethod('getValue');
  23. return value == null ? "null" : value;
  24. }
  25.  
  26. void Set(String value){
  27. js.context["Alteryx"]["Gui"]["Manager"].callMethod('getDataItem', [ayxConfigKey]).callMethod('setValue', [value]);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement