• saddam hussain 6
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
User-added image
<apex:page controller="StandardAccount" >
    <apex:form >
    	<apex:pageBlock >
            <apex:pageBlockSection >
            	<apex:inputText label="AccountName" value="{!name}"/>
                <apex:commandButton value="Search" action="{!search}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
<apex:pageBlock >
<apex:pageBlockTable value="{!accs}" var="a">
    <apex:column >
            <apex:inputCheckbox/>{!a.name} <br/><br/>
            <apex:inputCheckbox/>{!a.phone}<br/><br/>
            <apex:inputCheckbox/>{!a.industry}<br/><br/>
    </apex:column>
</apex:pageBlockTable>
</apex:pageBlock> </apex:form>
</apex:page>

apex program:

public class StandardAccount {
    public List<Account> accs{set;get;}
    public string Name {set;get;}
    public StandardAccount(){
        accs=new List<Account>();
    }
    public void search(){
        accs=[select id,name,phone,industry from Account where name=:name];
    }
    public class StandardAccountwrapper {
    public List<Account> acc{set;get;}
    public StandardAccountwrapper(){
        acc=new List<Account>();
    }
}
}