Guest User

Untitled

a guest
Aug 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <aura:attribute name="selectedCriteria" type="c.MyApexClass1" />
  2.  
  3. var selectedCriteria = component.get("v.selectedCriteria");
  4. var action = component.get("c.getOpportunities");
  5. action.setParams({"searchCriteria" : JSON.stringify(selectedCriteria)});
  6. action.setCallback(this, function(response) {
  7. var state = response.getState();
  8. if (state === "SUCCESS") {
  9.  
  10. }
  11.  
  12. @auraEnabled
  13. public static List<MyApexClass2> getOpportunities(String searchCriteria)
  14. {
  15. MyApexClass1 criteria=
  16. (MyApexClass1)JSON.deserialize(searchCriteria,MyApexClass1.class);
  17. }
Add Comment
Please, Sign In to add comment