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
XactiumBenXactiumBen 

Alternatives to packaging Visualforce

I am trying to find alternative ways to make sure my visualforce pages can be included in an application.  I have come across the object ApexPage in the webservices API that I have been attempting to use in a custom button.  I was getting some problems with setting the markup to this new page but I got around this by returning the markup from an apex class as a string and setting this as the markup.

Now, I was wondering if anyone has come across any solutions that are more automatic.  For instance, some way of creating the visualforce page when the package has been downloaded/deployed?
ESES
You can transfer pages between orgs using features available in force.com's eclipse plugin. You should be able to find documentation/older posts on how exactly to do it.
XactiumBenXactiumBen
My question was directed mainly at using appexchange to deliver the app.  In this instance, using eclipse may not be the best approach (i.e. having to get permission from other orgs to upload visualforce pages may get annoying).
dchasmandchasman
No - we are specifically not allowing packaging of Visualforce components and pages at this time to restrict publication of these objects to the AppExchange because of security concerns around the potential for third party authored cross site scripting (XSS) and cross site request forgery (CSRF) attacks that we felt compelled to address prior to opening this up to the world (this is to protect you from any malicious types out there). We actually completed packaging support for visualforce components/pages quite some time ago and this functionality will be released as soon as we have our Visualforce XSS/CSRF counter measures ready to deploy.

FYI this is my team's #1 priority now and we are hard at work on getting this done - we're chomping at the bit to get folks publishing/installing great powered-by-Visualforce content too!
XactiumBenXactiumBen
That's good to know.  :smileyhappy: Thanks for clearing that up.
bev90210bev90210
Hi Doug,
 
Was wondering if you could provide any indication if current VisualForce functionality will be restricted for packaged apps. We are developing a Visualforce-powered app (fantastic stuff!) and were considering calling our own javascript library hosted on our site, and not packaging it so we can update it on our end. Though we do assume access as a Remote Site. For example, we want to include this on our VisualForce pages.
 
<script src="http://www.3rdpartysite.com/abc.js"...></script>

 
 
Will this, or any other functionality currently in Visualforce be in any way restricted?
 
Any heads up would be great.
 
Thanks.
dchasmandchasman
Referencing javascript and images from servers outside of salesforce is fully supported with the exception of HTML-to-PDF generation. PDF generation happens inside our servers today and is subject to our firewalling policies. In the case of javascript this does not really matter very much anyway because our HTML to PDF layer does not evaluate javascript at all.

For your use case you should be good to go.