You need to sign in to do that
Don't have an account?
Vikram Singh 157
Hello ! i have learning VF pages and i have an question like how we can show prospect and customer direct picklist values on vf page
when we click on prospect and click on save it will display only prospect account records and same for customer direct. Can we achive it by statndard controller ?
My code is :
<apex:page controller="Test2Class" >
<apex:pageBlock >
<apex:pageBlockTable value="{!showList}" id="accountId" var="a1">
<apex:column headerValue="Account Name" value="{!a1.Name}"/>
<apex:column headerValue="Account Type" value="{!a1.Type}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Custom controller class:-
public class Test2Class{
public list<account> showList = new list<account>([select Id, Name, Type from Account where type='Prospect' and 'customer direct']);
Public list<account> getshowList(){
return showList;
}
}
My code is :
<apex:page controller="Test2Class" >
<apex:pageBlock >
<apex:pageBlockTable value="{!showList}" id="accountId" var="a1">
<apex:column headerValue="Account Name" value="{!a1.Name}"/>
<apex:column headerValue="Account Type" value="{!a1.Type}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Custom controller class:-
public class Test2Class{
public list<account> showList = new list<account>([select Id, Name, Type from Account where type='Prospect' and 'customer direct']);
Public list<account> getshowList(){
return showList;
}
}