You need to sign in to do that
Don't have an account?
Chang Yea Moon
how to programmatically set visual force properties
Hey there,
Is there a way to programmactically set these properties in my .page file?
For example I want to auto-enable `Show scrollbars` when someone adds this page. Or I want this page to always be 700px. etc
my .page file looks like the following format
<apex:page sidebar="false" standardController="something" showHeader="false" standardStyleSheets="false" extensions="more something"> <div id="root"/> <apex:includeScript loadOnReady="true" value="{!$somethingscript}"/> </apex:page>
Below below links that can help you.
http://salesforcehacks.blogspot.com/2014/12/resizing-embedded-vf.html
https://salesforce.stackexchange.com/questions/46200/dynamically-resize-visualforce-section-in-page-layout
https://salesforce.stackexchange.com/questions/30605/how-to-create-visualforce-page-with-iframe-with-auto-resizing-height
Thanks,
Vinay Kumar
Thanks for the quick response!
regarding the links:
The 1st link is outdated and no longer a viable solution.
The 2nd link seems close. Maybe because its outdated, I can't seem to get it working. Adding an <apex:detail /> is endlessy adding a new VF Page to my page
The 3rd link doesn't seem to be what I want, it is about adding a new iframe and not changing the existing one
Put everything under mainDiv.
There is no way you can set these values as it creates an iframe when embedding another vf page. You may try the above but i don't think this is possible.