function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JaydipJaydip 

Calling SControl object from Visual Force page

Hi,

 

Is  there any way, I could call a S-Control from a Visual Force page?

 

Thanks

 

JimRaeJimRae

You should look at the scontrol tag in the Visualforce help

 

 

<!-- For this component to work, you must have a valid s-control defined. --> <apex:page> <apex:scontrol controlName="HelloWorld" /> </apex:page>

 

 

JaydipJaydip

Thank you so much for your help.

I want to call S-Control from a button click in my VF page.

 

not sure, how to scontrol tag could help in this case. Could you please help?

 

 

Thanks

JimRaeJimRae

Since the scontrol is based in html, it needs to render in order to execute.

What you might consider is having the button toggle the render state of the scontrol tag, and refresh the page, the iframe for the scontrol would become visible and then fire.  Pressing the button again should cause it to fire again as the page would be rerendered again.

 

You would need a custom controller for this, that updates a boolean value from false to true to cause the scontrol to render.