Guest User

Untitled

a guest
Jun 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <aura:event type="COMPONENT" description="UpdateRPGFlowGraphEvent">
  2. <aura:attribute name="flow" type="zced__.RPG_Flow__c"/>
  3. <aura:attribute name="flowId" type="String"/>
  4. </aura:event>
  5.  
  6. handleButtonClick : function(component, event, helper) {
  7. let flowVar = component.get("v.flow");
  8. let flowIdVar = component.get("v.flowId");
  9.  
  10. if (flowVar || flowIdVar) {
  11. //if neither attribute is set, will be skipped
  12. //but if at least one is set, you're good to go
  13. } else {
  14. let toast = $A.get("e.force:showToast");
  15. // do something that tells the user to try again.
  16. toast.setParams({
  17. title: "Oops!",
  18. message: "You must enter either a flow or flow id value"
  19. });
  20. toast.fire();
  21. }
  22. }
Add Comment
Please, Sign In to add comment