Sunday, 3 February 2013

Spring 13 Release Notes in visualforce


Visualforce includes the following enhancements in Spring ’13. For detailed information on these enhancements, refer to the Visualforce Developer’s Guide.
liveAgent:clientChatAlertMessage and liveAgent:clientChatStatusMessage Components

Spring ’13 introduces two new Live Agent Visualforce components, liveAgent:clientChatAlertMessage and
liveAgent:clientChatStatusMessage.
The liveAgent:clientChatAlertMessage component lets you customize the alert messages that appear in your Live
Agent chat window. For example, you can specify alerts that inform your customers when support agents are unavailable to
chat, or if a local connection error prevents the customer from connecting to Live Agent.
The liveAgent:clientChatStatusMessage component lets you customize system status messages that appear in your
Live Agent chat window. You can specify messages that inform your customers when the system connection is disrupted –
for example, “You've been disconnected from the agent. Please wait while we attempt to re-establish the connection.”
For more information about using these components, see the Visualforce Developer’s Guide and the Live Agent Developer’s
Guide.
New Label Attribute on Live Agent Components

Spring ’13 introduces a label attribute on several Live Agent components, allowing you to specify the text that appears. The
label attribute is available on the following components:
• <liveAgent:clientChatAlertMessage>
• <liveAgent:clientChatEndButton>
• <liveAgent:clientChatLog>
• <liveAgent:clientChatSaveButton>
• <liveAgent:clientChatSendButton>
• <liveAgent:clientChatStatusMessage>

Dependent Picklists Require Controlling Field on the Page

Pages must include the controlling field for a dependent picklist. Failing to include the controlling field on the page causes a
runtime error when the page displays.
For example, if Location.city is dependent on Location.state, you must include both in your markup:
<apex:form>
<apex:outputField value="{!Location.state}"/>
<apex:outputField value="{!Location.city}"/>
</apex:form>

This change is versioned, and you must update your Visualforce pages to API version 27.0 to enable the new behavior.
Previously, when the controlling field was missing, the dependent picklist would simply show all possible values. To preserve this behavior, keep the page version set to API version 26.0 or earlier.

Custom Component Descriptions are Escaped

Beginning in the Spring ’13 release, the Description field for custom Visualforce components is escaped when it’s displayed
in the component reference, and when viewing the component definition.
Previously, the Description field for custom components wasn’t escaped, making it possible to add HTML and other markup to the Description field. This wasn’t an intended feature, and is now explicitly prevented.
Custom components with markup in the Description need to be fixed. To fix them, edit the component and remove all HTML and other markup from the Description field.

Compile-Time Checking for Custom Component Attribute Names

In the Spring ’13 release, there is a new compile-time check that prevents giving custom Visualforce component attributes the same name as the assignTo value (which can refer to a property or method in the component’s controller). This checking prevents a number of programming errors (bugs) that can result in runtime errors.This change is versioned, and you must update your Visualforce components and the pages that contain them to API version 27.0 to enable the new behavior.Previously, it was possible to create a custom component with an attribute that had the same name as the assignTo value.

For example:
<apex:component>
<apex:attribute name="currentpagename" type="string" assignTo="{!currentpagename}" description="This component can't be saved."/>
This component is no longer allowed.
</apex:component>

Force.com Visualforce
To make this component compile under API version 27.0, change either the attribute name or the assignTo value (which
might require you to also change a controller method or property). For example:
<apex:component>
<apex:attribute name="thepagename" type="string"
assignTo="{!currentpagename}"
description="This component saves just fine."/>
This component is OK!
</apex:component>
Note: Both components, as well as the pages they are displayed on, must be updated to API version 27.0 to enable the new compile-time check.



Visualforce Support in Salesforce Touch


In Spring ’13, you can enable Visualforce tabs to display in Salesforce Touch, allowing users to access associated Visualforce pages directly from the Salesforce Touch interface. Other forms of Visualforce, including inline Visualforce, overridden Visualforce pages, and standard Visualforce buttons and links, aren’t supported in the Spring ’13 release of Salesforce Touch.

Visualforce tabs in Salesforce Touch are indicated by an icon. Tapping the icon opens the tab—and the associated Visualforce page—in a new mobile browser window outside of the Salesforce Touch interface. The Visualforce page functions the same as if you were viewing it in the full Salesforce site.

Note: When Visualforce tabs are accessed from the downloadable version of Salesforce Touch, the Visualforce page is rendered with showHeader=false so all header and sidebar navigation is suppressed. In the mobile browser app,the header and sidebar do display and can be used to navigate within Salesforce.
You enable the display of Visualforce tabs in Salesforce Touch using the new boolean metadata field on the ApexPage object,isAvailableInTouch. The “Author Apex” user permission is required. Edit the isAvailableInTouch field through the metadata API or through the Salesforce setup interface.
In Salesforce, click Your Name > Setup > Develop > Pages, edit the desired page, then select the Available in Touch checkbox. isAvailableInTouch is available for API version 27.0 and above.

After you enable a Visualforce page for Salesforce Touch, any tabs that are associated with the page will display in Salesforce Touch. You can enable any Visualforce page for Salesforce Touch but if the page isn’t associated with a Visualforce tab, users won’t be able to access the page from Salesforce Touch.

In addition to enabling the desired Visualforce tabs, you need to turn on Visualforce support in Salesforce Touch from the Salesforce Touch Settings page.

Here are some notes about Visualforce tab support in this release of Salesforce Touch:
• Standard object tabs that are overridden with a Visualforce page aren't supported in Salesforce Touch. The Visualforce page is shown for full site users but Salesforce Touch users will see the default Salesforce Touch page for the entity instead. This restriction exists to maintain the Salesforce Touch experience for standard objects.

• Other Visualforce pages that are accessed from a Salesforce Touch-enabled Visualforce page don't need to have isAvailableInTouch enabled.

• The Mobile Ready checkbox on Visualforce Tab setup pages is for the Salesforce Mobile app only and has no effect on Visualforce in Salesforce Touch.


No comments:

Post a Comment