Join Sara Morgan for an in-depth discussion in this video Solution: Change variable text in markup, part of Visualforce: Improving Performance.
(chime)…- So here's how I went about…adding the starting and ending record numbers for each page.…As I hinted in the last challenge,…I only need one output text component,…so I will start by removing the second one here…for the page number.…And I'll also get rid of the value…and instead just embed…some conditional text down here within my "outputText".…
And since I have no methods in the standard set controller…for starting and ending record count per page,…I will have to do a calculation within the expression syntax…to get those values.…I can get the starting record number…by multiplying the page number times the page size,…adding a one to it and then subtracting the page size.…And those variables I do have.…So what I can do is go ahead and create…some conditional text here,…and I'm just going to use the expression syntax…and reference that set controller…and the "pageNumber".…
Now I'm going to multiply it times…the "pageSize".…Surround that with parentheses…and then add "1" to it.…I'm also going to subtract…the "pageSize".…
- Reducing and eliminating view states
- Evaluating SOQL for efficiency
- Using Workbench and the Query Plan tool to evaluate queries
- Reducing use of action tags through Visualforce remoting
- Working with the StandardSetController class
- Using static resources
Skill Level Intermediate
1. Getting Started
2. Reducing or Eliminating View State
3. Evaluating Queries for Efficiency
Limiting data returned10m 8s
4. Reducing Use of Action Tags
5. Taking Advantage of StandardSetControllers
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.