Visualforce apex:pageBlockSectionの使い方のサンプル

環境
Salesforce

構文
1.apex:pageBlock
Salesforce の詳細ページの外観に似た、デフォルトのコンテンツを使用しないスタイルを使用するページの領域です。
title
ページブロックのタイトルとして表示されるテキスト。
header ファセットが pageBlock コンポーネントの本文に含まれる場合、その値はこの属性より優先されます。

2.apex:pageBlockSection
標準の Salesforce ページレイアウト定義内のセクションに類似した、
<apex:pageBlock> コンポーネント内のデータのセクションです。
<apex:pageBlockSection> コンポーネントは、1 つ以上の列で構成されており、各列には、
項目の表示ラベルとその値の 2 つのセルがあります。
title ページブロックセクションのタイトルとして表示されるテキスト。

操作例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<apex:page sidebar="false" showHeader="false">
<h1>
Hello World test111
</h1>
<apex:pageBlock title="Blockタイトル">
<apex:pageBlockSection title="Sectionタイトル">
components
</apex:pageBlockSection>
<apex:pageBlockSection title="新しいSection">
別section
</apex:pageBlockSection>
</apex:pageBlock>
<p>
テストページ
</p>
</apex:page>
<apex:page sidebar="false" showHeader="false"> <h1> Hello World test111 </h1> <apex:pageBlock title="Blockタイトル"> <apex:pageBlockSection title="Sectionタイトル"> components </apex:pageBlockSection> <apex:pageBlockSection title="新しいSection"> 別section </apex:pageBlockSection> </apex:pageBlock> <p> テストページ </p> </apex:page>
<apex:page sidebar="false" showHeader="false">
    <h1>
        Hello World test111
    </h1>
    <apex:pageBlock title="Blockタイトル">
        <apex:pageBlockSection title="Sectionタイトル">
            components
        </apex:pageBlockSection>
        <apex:pageBlockSection title="新しいSection">
            別section
        </apex:pageBlockSection>
    </apex:pageBlock>

    <p>
        テストページ
    </p>
</apex:page>

 

Salesforce

Posted by arkgame