[SalesForce] How to use StandardController from visualforce Component

I have a single VisualForce Page and multiple Components, and each components have different controllers for individual operations. But in one of the VisualForce Components I want to upload a document to S3 bucket;

So to achieve this functionality without the view state limit error I have started with a scratch and created a VF page with StandardController "Document" and extension with custom controller and it worked well for me.

But same thing I want to use inside a Visualforce Component, but I am not able to use StandardController.

Best Answer

Visualforce Components can only take custom controllers, and cannot use standard controllers with custom extensions. You will need to build the controller yourself.

See documentation for ways to minimize the view state.

Related Topic