Javascript helper for Apex @RemoteActions