+ Start a Discussion
watanabe2watanabe2 

displaying wrapper class in pageblocktable

I have a controller which creates a wrapper class and a list of this wrapper class.

 

I have a Visualforce page which uses the standard opportunity controller with the controller containing the wrapper class as an extension. The VF page must use the standard opportunity controller because it is being embedded on the opportunity page layout.

 

I want the Visualforce page to iterate over the list of the wrapper class within a pageBlockTable.

 

However, I get this error.

Error: Unknown property 'OpportunityStandardController.AttachmentWOwnerProfile'

 

How do I let the pageBlockTable know that the list is contained within the extension class?

Best Answer chosen by watanabe2
souvik9086souvik9086

Before referring to the page make sure that you do the following things on the extension

 

public List<YourWrapperClass> yourWrapperClassVar{get;set;}

yourWrapperClassVar = new List<YourWrapperClass>();

//Then populate it.

 

VF

Use yourWrapperClassVar variable in VF.

 

If the post is helpful please throw KUDOS.

All Answers

Subramani_SFDCSubramani_SFDC

You may Use Standard Set Controller with wrapper class as an extension Controller....

 

 

 

Refer this link

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_pages_standardsetcontroller.htm

souvik9086souvik9086

Before referring to the page make sure that you do the following things on the extension

 

public List<YourWrapperClass> yourWrapperClassVar{get;set;}

yourWrapperClassVar = new List<YourWrapperClass>();

//Then populate it.

 

VF

Use yourWrapperClassVar variable in VF.

 

If the post is helpful please throw KUDOS.

This was selected as the best answer