Visualforce Winter08

Controller Extensibility

You can now extend standard controllers with your own Apex Code methods. You can also extend one controller class with methods from another. This represents a powerful ability to extend standard controllers with specific user developed functionality

Use Case

Developer would like to perform an additional action at the time a normal Visualforce input page is submitted and saved. The desired code is written as a class in Apex Code and then added to the tag in the visualforce page, all normal standard controller behaviors occur as normal.

Availability

Preview availability in Developer Edition.

Several New Components

Note, there are some component name changes in this release, and your existing code may need to be updated before it will work properly. This should be a quick process, and these names should not change again. Other names may still change but the differences will become smaller with each release

Use case

You would like to display a formatted currency or date in your Visualforce page, then you would use the new outputField component to represent a read only element of data from your record. Several other new components exist to duplicate and extend the salesforce look and feel. The complete list of components will be available in the online documentation found in pre-release.

Availability

Preview availability in Developer Edition.

Controller Apex Debug Log

You can now debug Visualforce with the Apex Debug Log present in the Developer Edition. Very helpful for debugging, this feature ensures that statements written to ApexDebug Log using System.Debug() in your controller code will be sent to the Apex Debug Log,

Use case

As a developer you can open the Apex Debug Log window while you are working on a controller or page, and your debug statements will appear there. Use this to debug Visualforce.

Availability

Preview availability in Developer Edition.

Static resources

Static resources allow you to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, stylesheets, JavaScript, and other files.

Use case

As a Developer you can package a collection of related files into a directory hierarchy and upload that hierarchy as a .zip or .jar archive. Your Visualforce page can reference a static resource in page markup by using the $Resource global variable instead of hard-coding document IDs.

Availability

Preview availability in Developer Edition.


Content Types

You can specify a different format for a Visualforce page by using the ContentType attribute on the <apex:page> tag. The ContentType attribute takes a Multipurpose Internet Mail Extension (MIME) media type as a value, such as application/vnd.ms-works,audio/mpeg or image/gif.

Use case

As a Developer you would like to create a Visualforce page that offers an export as Excel button or feature. With the content type feature you could specify a page with a type "application/vnd.ms-excel" and the user will be able to open the data from your page directly into Excel.

Availability

Preview availability in Developer Edition.