Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. ****Helper class*****
  2.  
  3. component.set("v.searching", true);
  4. var action = component.get("c.runCompanySearch");
  5. // Mark the action as abortable, this is to prevent multiple events from the keyup executing
  6. action.setAbortable();
  7. action.setParams({
  8. "siteID": component.get("v.siteID"),
  9. "searchString": component.get("v.searchString")
  10. });
  11. action.setCallback(this, function(response) {
  12. var state = response.getState();
  13. if (component.isValid() && state == "SUCCESS") {
  14. component.set("v.searching", false);
  15. component.set("v.SECompanies", response.getReturnValue());
  16. **************Here I am accessing the variable********
  17. component.set("v.seColumns",seColumns);
  18. component.find("seTable").initialize({
  19. "order":[0,"desc"]
  20. });
  21. ******************************************************
  22. console.log(response.getReturnValue());
  23. } else if (state === "ERROR") { // Handle any error by reporting it
  24. var errors = response.getError();
  25.  
  26. if (errors) {
  27. if (errors[0] && errors[0].message) {
  28. this.displayToast('Error', errors[0].message);
  29. }
  30. } else {
  31. this.displayToast('Error', 'Unknown error.');
  32. }
  33. }
  34. });
  35. $A.enqueueAction(action);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement