Last active
December 28, 2015 05:59
-
-
Save capeterson/7453394 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class MyControllerThing{ | |
@RemoteAction | |
public static MyWrapperThing getWrapper(){ | |
MyWrapperThing result = new MyWrapperThing(); | |
result.isSomething = true; | |
result.name = 'my wrapper obj'; | |
result.version = 7; | |
return result; | |
} | |
@RemoteAction | |
public static String getWrapperJSON(){ | |
MyWrapperThing result = new MyWrapperThing(); | |
result.isSomething = true; | |
result.name = 'my wrapper obj'; | |
result.version = 7; | |
return JSON.serialize(result); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyWrapperThing{ | |
public boolean isSomething; | |
public String name; | |
public Integer version; | |
public String Id{ | |
get{ | |
return name+'.'+version; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment