1.3.7 • Published 8 years ago
visualforce-sim v1.3.7
visualforce-sim
Salesforce javascript remoting simulator
Installation
npm install -g visualforce-simRunning the simulator using default port 3000
cd <web application project>
visualforce-simRunning the simulator using custom port (4000)
cd <web application project>
PORT=4000 visualforce-simRunning the simulator to use live @RemoteAction methods
If SF_INSTANCE is not set, it will use https://login.salesforce.com
cd <web application project>
export SF_USERNAME=<username>
export SF_PASSWORD=<password>
export SF_INSTANCE=<instance url>
visualforce-sim -lAuto reload browser when editing files in <web application project>
cd <web application project>
visualforce-sim -wCustom filter
If you want to show the default filter being passed in executeAnonymous
visualforce-sim -sIf you want set your custom filter
visualforce-sim -f filter.txtShow command line usage
visualforce-sim --helpSample remoting for mocked Apex classes
Right now visualforce-sim javascript client requires jQuery
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="node_modules/visualforce-sim/visualforce-sim-client.js"></script>
<script>
function callback(data) {
console.log(data);
// Output will be [{name:"One",value:1},{name:"Two",value:2}]
}
Visualforce.remoting.Manager.invokeAction('ApexController.getList', callback, {escape:true});
</script>Create a class in <web application project>/apex-remote/ApexController.js
var ApexController = (function () {
function ApexController() {
}
ApexController.prototype.getList = function () {
return [
{name:"One", value:1},
{name:"Two", value:2}
];
};
return ApexController;
}());
exports.default = ApexController;Setting custom api base path
<script>
...
Visualforce.remoting.Manager.serverApiBasePath = 'http://localhost:4000';
</script>1.3.7
8 years ago
1.3.6
8 years ago
1.3.5
8 years ago
1.3.4
8 years ago
1.3.3
8 years ago
1.3.2
8 years ago
1.3.1
8 years ago
1.3.0
8 years ago
1.2.5
8 years ago
1.2.4
8 years ago
1.2.3
8 years ago
1.2.2
8 years ago
1.2.1
8 years ago
1.2.0
8 years ago
1.1.11
8 years ago
1.1.10
8 years ago
1.0.10
8 years ago
1.0.9
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago