Skip to content

Instantly share code, notes, and snippets.

@capeterson
Last active December 28, 2015 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capeterson/7453394 to your computer and use it in GitHub Desktop.
Save capeterson/7453394 to your computer and use it in GitHub Desktop.
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);
}
}
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