Skip to main content
답변 1개
  1. 2016년 12월 6일 오전 7:53
    HI Sweety,

    // Controller

    public Class PassRecordId{

    public String Id{get;set;}

    public List<Account> listOfAccounts{get;set;}

    public List<Account> listOfSelectAccount{get;set;}

        public PassRecordId(){

            ListOfAccounts =  [SELECT Id From Account LIMIT 10000] ;

        }

        public void AccountRecords(){

            listOfSelectAccount =  [SELECT Id From Account Where Id =: Id LIMIT 1] ;

            system.debug(listOfSelectAccount);

        }

    }

    // Page

    <apex:page controller="PassRecordId" id="thePage">

        <apex:repeat value="{!listOfAccounts}" var="AccountId" id="theRepeat">

            <apex:selectRadio value="{!Id}">

                <apex:selectOptions value="{!AccountId.id}"/>

            </apex:selectRadio>

        </apex:repeat>

    <apex:commandButton action="{!AccountRecords}" value="Get Account"/>

    </apex:page>
0/9000