describeFlexiPages()
一連の Lightning ページに関するメタデータ詳細を取得します。Lightning ページは、Salesforce1 ナビゲーションメニューのメニュー項目として表示されるモバイルアプリケーションのホームページです。
構文
1DescribeFlexiPageResult[] = connection.describeFlexiPages(string flexiPageNames[]);使用方法
このコールを使用して、指定された Lightning ページに関する情報を取得します。このコールは、各 Lightning ページのレイアウトや関連付けられた QuickAction など、一連の Lightning ページに関するメタデータを返します。
flexiPageNames に対して空のリストを指定すると、Lightning ページは返されません。
サンプルコード —Java
このサンプルでは、Lightning ページの取得方法を示します。記述する Lightning ページの名前を使用して、describeFlexiPage() をコールします。 Lightning ページを取得すると、範囲、コンポーネント、およびプロパティが出力されます。
1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17public void describeFlexiPageSample() {
18 try {
19 // Retrieve a single FlexiPage
20 String flexiPageName = "MyFlexiPage";
21 DescribeFlexiPageResult[] result = null;
22 result = connection.describeFlexiPages(new String[]{flexiPageName});
23 String msg = String.format("There are %s FlexiPages described in the response", result.length);
24 System.out.println(msg);
25 DescribeFlexiPageResult page = result[0];
26
27 // Iterate over the regions of the FlexiPage
28 for (DescribeFlexiPageRegion region : page.getRegions()) {
29 msg = String.format("Region: %s", region.getName());
30
31 // Iterate over the components in each region
32 for (DescribeComponentInstance cmp : region.getComponents()) {
33 String fullComponentName = cmp.getTypeNamespace() + ":" + cmp.getTypeName();
34 System.out.println("Component: " + fullComponentName);
35
36 // Iterate over the properties of each component
37 for (DescribeComponentInstanceProperty prop : cmp.getProperties()) {
38 msg = String.format("Property [%s] has value [%s]", prop.getName(), prop.getValue());
39 System.out.println(msg);
40 }
41 }
42 }
43 } catch (ConnectionException ce) {
44 ce.printStackTrace();
45 }
46}引数
| 名前 | 型 | 説明 |
|---|---|---|
| flexiPages | string[] | 取得する Lightning ページの配列。 |