O'Reilly logo

Visualforce Development Cookbook by Keir Bowden

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mobile Visualforce forms

Capturing data from a mobile site can be achieved in a number of ways. The most straightforward, from a markup and code perspective, is to use a standard controller to manage the page and capture the information via a standard <apex:form /> component. This mechanism requires the Visualforce viewstate to be used to maintain the state between the controller and the page, which is somewhat heavyweight for a mobile device and precludes use of Visualforce Ajax functionality, as this would interfere with the jQuery Mobile Ajax page navigation.

The other option is to use JavaScript to send the information back to Salesforce, either via the REST API or JavaScript Remoting. Using the REST API makes an application more portable, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required