宣言コンポーネントを定義します。
現在のWebブラウザでは、垂直方向にスクラッチされるコンテンツが、同じくスクロール・バーのある領域の内側にあると、信頼性が失われます。ページ構造の外部領域をストレッチする場合は、コンポーネント・ツリーのアセンブル方法に注意する必要があります。第1に、(panelSplitterとpanelStretchLayoutを使用して)ストレッチ可能なコンポーネントの構造を作成します。第2に、この構造内に、ストレッチされないコンテンツのアイランドを作成します。これらのアイランドは、layout="scroll"が設定されたpanelGroupLayoutに基づいている必要があります。このようなコンポーネントは、ストレッチされることができ、かつその子をストレッチしないため、事実上ストレッチされません。経験則: 1.)スクロールpanelGroupLayoutは別のスクロールpanelGroupLayoutの内側に配置しないでください。これは、スクロール・バーがネストされていると、操作性が低下するためです。2.)どのコンポーネントのinlineStyle属性でも、パーセンテージ高さを指定しないでください。3.)いずれのコンポーネントのinlineStyle属性でも、positionスタイルを使用しないでください。4.)固定ピクセル高さを使用しないかぎり、レイアウト属性の設定に関係なく、panelSplitterとpanelStretchLayoutは、どのpanelGroupLayoutの内側にも配置しません。これらの経験則に反する設定が必要となる場合は、ページ構造がページ構造ガイドラインに準拠していない可能性があります。このような場合、様々なWebブラウザやコンピューティング・プラットフォームに対して、アプリケーションのレンダリングの一貫性を維持できないことがあります。コンポーネントのストレッチに関する具体的な詳細は、各コンポーネントのタグ・ドキュメントのジオメトリ管理に関する項を参照してください。アプリケーションで開始点として使用できる実際のレイアウト例については、デモ・アプリケーションを参照してください。適切な開始点は、デモ・アプリケーションの「Framework Features」タブに一覧表示されるLayout Basicsページです。
<source> <?xml version='1.0' encoding='utf-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" version="2.0"> <af:componentDef var="attrs" componentVar="adfComponent"> <af:commandButton partialSubmit="true" text="#{attrs.text}" actionListener="#{adfComponent.handleAction}"/> </af:componentDef> </jsp:root>
</source>
<source> <mytags:simpleDC text="First" actionListener="#{testSimpleDC.actionFired}"/> </source>
<source> <af:declarativeComponent viewid="simpleDC_jsff" text="First" actionListener="#{testSimpleDC.actionFired}"/>
</source>
<source> <tag> <description> Simple test of declarative components </description> <name>simpleDC</name> <tag-class>oracle.adfdemo.view.test.custom.SimpleDCTag</tag-class> <body-content>JSP</body-content> <attribute> <description>The component identifier.</description> <name>id</name> </attribute> <attribute> <description>An expression indicating where to store this component, once created. </description> <name>binding</name> <deferred-value/> </attribute> <attribute> <description>Indicates whether or not this component should be rendered. </description> <name>rendered</name> <deferred-value> <type>boolean</type> </deferred-value> </attribute> <attribute> <description>Indicates whether or not this component should be state saved. </description> <name>transient</name> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <description>a string to show </description> <name>text</name> <deferred-value/> </attribute> <attribute> <description>a method reference to an action listener</description> <name>actionListener</name> <deferred-method> <method-signature>void myMethod(javax.faces.event.ActionEvent)</method-signature></deferred-method> </attribute> </tag>
</source>
名前 | 型 | ELのサポート | 説明 |
---|---|---|---|
var | String | なし | このコンポーネントの使用方法で定義された属性を参照するために使用するEL変数の名前。 |
componentVar | String | なし | コンポーネントのインスタンス自身の識別に使用するEL変数の名前。 |