LoginSignup
0
0

More than 3 years have passed since last update.

Lightningコンポーネント(サーバー側コントローラー)

Last updated at Posted at 2017-02-17

サーバー側RESTメソッド

クライアント側から呼び出すREST APIメソッドはstatic かつ @AuraEnabledを付ける。
クラス定義はVF用コントローラと同じで普通のクラスでよい。

@AuraEnabled
public static List<xxx> getXXX(Id xx){

クライアント側に返すカスタムオブジェクト

プロパティ、メンバーには @AuraEnabledを付けないと、クライアント側JSからは見えない

public class Item {
    @AuraEnabled public String itemNo {set; get;}
    @AuraEnabled public String tabName {set; get;}

サーバー側メソッドのパラメータとJS側から送られるデータ型の対応については下記のリンクが参考になる。

Lightning Components & AuraEnabled method parameters: What’s working and what’s not

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0