Lightningコンポーネント(サーバー側コントローラー)
2134 ワード
サーバー側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
Author And Source
この問題について(Lightningコンポーネント(サーバー側コントローラー)), 我々は、より多くの情報をここで見つけました https://qiita.com/TaigerAndDragon/items/892978245c2c52942ca1著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .