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.
- PageReference(String)
Creates a new instance of the PageReference class using the specified URL. - PageReference(SObject record)
Creates a new instance of the PageReference class for the specified sObject record.
No comments:
Post a Comment