Created
August 2, 2017 10:31
-
-
Save 101dvlp/1ed14735410c0df223ba0353878def18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page showHeader="true" sidebar="true" controller="displaySObjectList"> | |
<p>Sobjectのリストを取得してオブジェクト名とプレフィックスを表示します</p> | |
<p>プレフィックスがnullのものは表示されません</p> | |
<div> | |
<apex:form> | |
<apex:commandButton value="display" action="{!CreateObjectList}" reRender="result"/> | |
</apex:form> | |
</div> | |
<div> | |
<apex:outputPanel id="result"> | |
<!-- 標準オブジェクトを出力 --> | |
<table style="border-collapse: collapse; font-family: sans-serif;"> | |
<caption style="background-color: lightgray; font-size: 1.4em; font-weight: bold; margin-top: 1.5em;">Standard Object</caption> | |
<tr style="border-bottom: 1px solid gray;"> | |
<th>Number</th> | |
<th>Prefix</th> | |
<th>Name</th> | |
<th>Label</th> | |
</tr> | |
<apex:variable value="{!1}" var="num"/> | |
<apex:repeat value="{!StdObject}" var="std"> | |
<tr style="border-bottom: 1px solid gray;"> | |
<td style="font-family: sans-serif;">{!num}</td> | |
<td style="font-family: sans-serif; font-weight: bold;">{!std}</td> | |
<td style="font-family: sans-serif;">{!StdObject[std][0]}</td> | |
<td style="font-family: sans-serif;">{!StdObject[std][1]}</td> | |
</tr> | |
<apex:variable value="{!num + 1 }" var="num"/> | |
</apex:repeat> | |
</table> | |
<!-- カスタムオブジェクトを出力 --> | |
<table style="border-collapse: collapse;font-family: sans-serif;"> | |
<caption style="background-color: lightgray; font-size: 1.4em; font-weight: bold; margin-top: 1.5em;">Custom Object</caption> | |
<tr style="border-bottom: 1px solid gray;"> | |
<th>Number</th> | |
<th>Prefix</th> | |
<th>Name</th> | |
<th>Label</th> | |
</tr> | |
<apex:variable value="{!1}" var="num"/> | |
<apex:repeat value="{!cstmObject}" var="cstm"> | |
<tr style="border-bottom: 1px solid gray;"> | |
<td style="font-family: sans-serif;">{!num}</td> | |
<td style="font-family: sans-serif; font-weight: bold;">{!cstm}</td> | |
<td style="font-family: sans-serif;">{!cstmObject[cstm][0]}</td> | |
<td style="font-family: sans-serif;">{!cstmObject[cstm][1]}</td> | |
</tr> | |
<apex:variable value="{!num + 1 }" var="num"/> | |
</apex:repeat> | |
</table> | |
</apex:outputPanel> | |
</div> | |
</apex:page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment