この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

describeFlexiPages()

一連のフレキシブルページに関するメタデータ詳細を取得します。フレキシブルページは、Salesforce1 ナビゲーションメニューのメニュー項目として表示されるモバイルアプリケーションのホームページです。

構文

1DescribeFlexiPageResult[] = connection.describeFlexiPages(string flexiPageNames[]);

使用方法

このコールを使用して、指定されたフレキシブルページに関する情報を取得します。このコールは、各フレキシブルページのレイアウトや関連付けられた QuickAction など、一連のフレキシブルページに関するメタデータを返します。

flexiPageNames に対して空のリストを指定すると、フレキシブルページは返されません。

このコールは高度な API コールであり、通常は、モバイルデバイスで出力を生成するためのカスタムページ表示コードを記述してから出力結果を表示する前にフレキシブルページのレイアウト詳細を確認する必要のあるパートナーが使用します。

メモ

サンプルコード —Java

このサンプルでは、フレキシブルページの取得方法を示します。記述するフレキシブルページの名前を使用して、describeFlexiPage() をコールします。  フレキシブルページを取得すると、領域、コンポーネント、およびプロパティが出力されます。

1swfobject.registerObject("clippy.codeblock-1", "9");public void describeFlexiPageSample() {
2  try {
3        // Retrieve a single FlexiPage
4        String flexiPageName = "MyFlexiPage";
5        DescribeFlexiPageResult[] result = null;
6        result = connection.describeFlexiPages(new String[]{flexiPageName});
7        String msg = String.format("There are %s FlexiPages described in the response", result.length);
8        System.out.println(msg);
9        DescribeFlexiPageResult page = result[0];
10
11        // Iterate over the regions of the FlexiPage
12        for (DescribeFlexiPageRegion region : page.getRegions()) {
13            msg = String.format("Region: %s", region.getName());
14            
15            // Iterate over the components in each region
16            for (DescribeComponentInstance cmp : region.getComponents()) {
17                String fullComponentName = cmp.getTypeNamespace() + ":" + cmp.getTypeName();
18                System.out.println("Component: " + fullComponentName);
19                
20                // Iterate over the properties of each component
21                for (DescribeComponentInstanceProperty prop : cmp.getProperties()) {
22                    msg = String.format("Property [%s] has value [%s]", prop.getName(), prop.getValue());
23                    System.out.println(msg);
24                }
25            }
26        }
27    } catch (ConnectionException ce) {
28      ce.printStackTrace();
29    }
30}

引数

名前 説明
flexiPages string[] 取得するフレキシブルページの配列。