<apex:page controller="AccountSearch">
<apex:form >
<apex:pageBlock >
<apex:outputPanel >
Enter account Name: <apex:inputtext value="{!name}"/>
<apex:actionsupport event="onclick" action="{!search}" rerender="out"/>
</apex:outputPanel>
<apex:outputPanel id="out">
<apex:pageBlockTable value="{!conlist}" var="c">
<apex:column value="{!c.name}"/>
</apex:pageBlockTable>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>
=============
public class AccountSearch {
public string name {get;set;}
public List<Contact> conlist{get;set;}
public void search(){
conlist= new list<contact>();
conlist=[select id, name,phone from contact where account.name=: name];
}
}
<apex:form >
<apex:pageBlock >
<apex:outputPanel >
Enter account Name: <apex:inputtext value="{!name}"/>
<apex:actionsupport event="onclick" action="{!search}" rerender="out"/>
</apex:outputPanel>
<apex:outputPanel id="out">
<apex:pageBlockTable value="{!conlist}" var="c">
<apex:column value="{!c.name}"/>
</apex:pageBlockTable>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>
=============
public class AccountSearch {
public string name {get;set;}
public List<Contact> conlist{get;set;}
public void search(){
conlist= new list<contact>();
conlist=[select id, name,phone from contact where account.name=: name];
}
}
This is one awesome blog article. Much thanks again salesforce certification
ReplyDeletekuşadası
ReplyDeletemilas
çeşme
bağcılar
ordu
7QDWW