Component
コンポーネントインスタンスは、コンポーネントとコンポーネントのマークアップの生成を担当するレンダリングエンジンの間のバインディングを記述します。 通常、レンダリングエンジンは Surf Webスクリプトエンジンです。
場所
- classpath:/alfresco/site-data/components
- classpath:/alfresco/web-extension/site-data/components
定義
<component> <!-- Required --> <scope>page | template | global</scope> <region-id>REGION_ID</region-id> <source-id>SOURCE_ID</source-id> <!-- Optional --> <url>URL</url> <component-type-id>COMPONENT_TYPE_ID</component-type-id> <chrome>CHROME_ID</chrome> </component>
プロパティ
- <id> - 規則にのっとったコンポーネントID
- ページおよびテンプレートスコープリージョンのバインディングの場合、規則は <scope>.<region-id>.<source-id>
- グローバルスコープ内のリージョンへのバインディングの場合、規則は global.<region-id>
- <scope> - バインディングの範囲(ページ、テンプレート、グローバル)
- <region-id> - バインドされている領域の名前
- <source-id> - コンポーネントがバインドされているページまたはテンプレートインスタンスのID。 グローバルスコープの場合、global に設定する必要があります。
オプションプロパティ
- <url> - WebスクリプトのURL(Webスクリプトがレンダリングされている場合)
- <component-type-id> - このコンポーネントのコンポーネントタイプID
- <chrome> - このコンポーネントのプレゼンテーションのフレームに使用されるChromeのID
例 - ページスコープバインディング
このコンポーネントは /sample/content という URL を持つ Webスクリプトを home ページの content という名前のページスコープの領域にバインドします。 したがって、 page.content.home
の ID を持ちます。
classpath:/alfresco/web-extension/site-data/compnents/page.content.home.xml <?xml version="1.0" encoding="utf-8"?> <component> <id>page.content.home</id> <scope>page</scope> <region-id>content</region-id> <source-id>home</source-id> <url>/sample/content</url> </component>
例 - テンプレートスコープバインディング
この例では/sample/header という URL を持つ Webスクリプトを home テンプレートの header というテンプレートスコープの領域にバインドします。したがって、 template.header.home
の ID を持ちます。
classpath:/alfresco/web-extension/site-data/compnents/template.header.home.xml <?xml version="1.0" encoding="utf-8"?> <component> <id>template.header.home</id> <scope>template</scope> <region-id>header</region-id> <source-id>home</source-id> <url>/sample/header</url> </component>
例 - グローバルスコープバインディング
この例では /sample/footer という URL を持つ Webスクリプトを footer という名前のグローバルスコープの領域にバインドします。 したがって、global.footer
の ID があります。
classpath:/alfresco/web-extension/site-data/compnents/global.footer.xml <?xml version="1.0" encoding="utf-8"?> <component> <id>global.footer</id> <scope>global</scope> <region-id>footer</region-id> <source-id>global</source-id> <url>/sample/footer</url> </component>
例 - カスタムページスコープバインディング
この例では /sample/content の URL を持つ Webスクリプトを home ページの content という名前のページスコープ領域にバインドします。Surf はレンダリング時に Component をカスタムコンポーネントの Chrome でラップするよう通知します。また、Webスクリプトが実行中に使用できるいくつかのカスタムプロパティを提供します
classpath:/alfresco/web-extension/site-data/compnents/page.content.home.xml <?xml version="1.0" encoding="utf-8"?> <component> <id>page.content.home</id> <scope>page</scope> <region-id>content</region-id> <source-id>home</source-id> <url>/sample/content</url> <chrome>sample-chrome</chrome> <properties> <view>FULL</view> <style>formal</style> </properties> </component>
原文:Component
Related content
リックソフト株式会社 は、日本でトップレベルのAtlassian Platinum Solution Partnerです。
大規模ユーザーへの対応実績が認められたEnterpriseの認定をうけ、高度なトレーニング要件をクリアし、小規模から大規模のお客様まで対応可能な実績を示したパートナー企業です。
Copyright © Ricksoft Co., Ltd. プライバシーポリシー お問い合わせ