Skip to main content

Posts

Showing posts from June, 2013

Fun with Angular Js and Visualforce Page

Recently i authored a visualforce page just to demonstrate the use of angular JS (Javascript framework from google ).It was very good experience working with Harshit Pandey.

The idea was just to demonstrate how easily even with getters concept of visualforce one can bind data to the angular JS script

The page gives functionality of sorting ,pagination and searching all in a single UI.The UI is done through twitter bootstrap plugin.

The page code can be found below


The controller code is very simple and its just returning JSON object

The demo link is at http://webzone-developer-edition.ap1.force.com/webzone

The same post is posted by Harshit in a friendly format .You can find at following link http://www.oyecode.com/2013/06/getting-started-with-angularjs-on.html

Thanks and Happy Coding !

Using CSS in pdf for page numbering with API 28.0 (@page CSS properties)

Generating PDF in salesforce is very easy with renderAs="pdf" attribute of apex page tag.For those of you needing sample on how to achieve this ,the below link points in right direction to get started and create some professional documents using some CSS power and Visualforce tags

http://wiki.developerforce.com/page/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce

With API 28.0 my designed visualforce pages stopped showing the pagenumbers and other CSS attributes using style with @page annotations .

Here is the code that i tried in sample page to figure the issue with less code


This code yielded a pdf with no page number and hence conclusion that the @page CSS style properties are not working in API 28.0
Now the question arises like why it works in API 27.0 and not in API 28.0 .To understand this i read enhancements that came in API 28.0 on visualforce .I inserted html tag at start in API 27.0 and found again that @page attribute was not working.Hence injection …