Pages

Tuesday, September 23, 2008

How to host a S-Control in your Visualforce Pages?

In order to host your s-control in your Visual Force Pages you need to the the following steps:

  1. Create a new VF page or go to your existing VF page editor
  2. Pick your S-Control API name and have it ready.
  3. Within the Page block or where you find suitable add an apex:scontrol tab as follows:


<apex:scontrol controlName="Map_Directions" width="-100" height="415"> </apex:scontrol>

Notice that your controlName should be your S-Control's API name and this something interesting I found out, if you wish your S-control to be aligned horizontally to 100% of the page's width then you need to set the "width" attribute to "-100" !

Later on I will show you, how can you luanch your VP Page with your S-Control on it from a detail button.

Happy coding!


4 comments:

  1. thanks... but my html table border is not visible in vf page

    ReplyDelete
  2. thank for straight forward answers

    ReplyDelete
  3. Hi..Sam
    Thanks for this amazing and usefull blog.Here,
    I want to apply the same functionality of Google Map direction Using Visual-force. As you have done this using S-controls which are no more.

    ReplyDelete