Ajax (1) Apex Class (12) Apex Trigger (2) Community (2) Home Page (1) HTML (4) Integration (3) JS (7) KB (1) Label (1) Licenses (1) Listing (1) Log (1) OOPs (5) Sharing (1) Static Resource (1) Test Class (3) URI (1) Visualforce (10)

Wednesday 5 March 2014

PageReference Methods and Constructors

PageReference Methods

The following are methods for PageReference. All are instance methods.

  • getAnchor() 
    Returns the name of the anchor referenced in the page’s URL. That is, the part of the URL after the hashtag (#).
  • getContent() 
    Returns the output of the page, as displayed to a user in a Web browser.
  • getContentAsPDF() 
    Returns the page as a PDF, regardless of the <apex:page> component's renderAs attribute.
  • getCookies() 
    Returns a map of cookie names and cookie objects, where the key is a String of the cookie name and the value contains the list of cookie objects with that name.
  • getHeaders() 
    Returns a map of the request headers, where the key string contains the name of the header, and the value string contains the value of the header.
  • getParameters() 
    Returns a map of the query string parameters that are included in the page URL. The key string contains the name of the parameter, while the value string contains the value of the parameter.
  • getRedirect() 
    Returns the current value of the PageReference object's redirect attribute.
  • getUrl() 
    Returns the relative URL associated with the PageReference when it was originally defined, including any query string parameters and anchors.
  • setAnchor(String) 
    Sets the URL’s anchor reference to the specified string.
  • setCookies(Cookie[]) 
    Creates a list of cookie objects. Used in conjunction with the Cookie class.
  • setRedirect(Boolean) 
    Sets the value of the PageReference object's redirect attribute. If set to true, a redirect is performed through a client side redirect.

PageReference Constructors

The following are constructors for PageReference.

No comments:

Post a Comment