public class AccountExtension {
public Account acc;
public String Accid;
public String getAccid(){return Accid;}
public void setAccid(String userinput)
{
//Your logic here to get data and display in visualfoce component.
}
public ContactListExtension() {
}
}
public void setAccid(String userinput)
{
//Your logic here to get data and display in visualfoce component.
acc = [select id,Name from Account where id =: userinput];
}
Please see the example below
Please see the link below
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_iteration_components.htm
Best Regards
Naga kiran
You can use standard Controller in your page to retrive the Account data in visualforce page using components.
Eg:
<apex:page standardController="Account">
<apex:outputField value="{!Account.name}"/>
<apex:outputField value="{!Account.name}"/>
</apex:page>
You need to create a component which will receive Account id as parameter and then extract other field inside the component.
so your visualforce page will be like this
your component will look like this.
and here will be your apex class
Makes sense?
Thanks,
Himanshu
can you please send above scenario complete code.
That is complete code you need to only query Account object in Accountextension class at line 8
component