9 votes
Accepted

Tooltip for <apex:column> Header Facet

If you are trying to find something like the standard UI tooltip - the question mark with a round, yellow background. You can simply use something like this: <apex:image value="/s.gif" styleClass=...
  • 12.9k
6 votes
Accepted

pageBlockTable - row number variable is not incremented

The dataTable and pageBlockTable elements do weird things for content outside of apex:column elements (usually by way of ignoring the content entirely). If you put the counter inside a column, it will ...
  • 462k
6 votes
Accepted

Create PageBlockTable With Two Types Of SObject

Just use a List<SObject> property. Your controller should look something like: public with sharing class MyController { public List<SObject> tasksAndNotes { get; private set; } ...
  • 147k
6 votes

Disabling Mouse-hover-color-change for the apex:pageBlockTable

You can't "disable" it, but apparently you can countermand it. I've come up with two potential solutions. !important Use an important style. <style> .red, .red.highlight { background: red ...
  • 462k
5 votes
Accepted

Display multiple List<String> objects as columns in a visualforce page

You should create a 2 dimensional array or we can say List of List which looks like List<List<String>> twoDimArray and try to iterate it like: <apex:repeat value="{!twoDimArray}" var="...
  • 22.4k
5 votes
Accepted

How do I stop the loading indicator on the VF page?

The apex:actionSupport tag has an oncomplete attribute where you can call another JavaScript function that sets the display attributes to 'none'. That call is performed when the AJAX request has ...
  • 133k
5 votes
Accepted

Retrieving an image from rich text field?

Rich fields are stored as HTML in Salesforce, so to retrieve your image, you will have to parse the text and get the image from there. Luckily this is a fairly simple task to do. Once queried, the ...
5 votes
Accepted

Dynamically Create Columns in Block Table From Object's Fields

The problem is the dot in here making the page compiler expect a field name immediately after the dot: {!prod2.[fieldAPIName]} Should work without that: {!prod2[fieldAPIName]} Fyi, here is a ...
  • 133k
4 votes
Accepted

Reference a child field in grid or create grid from standard controller

You can indeed reference a child in pure Visualforce. Note that if you want just one record, you don't get to choose which one will be displayed (it will probably be the oldest record, but no ...
  • 462k
4 votes

pageBlockTable - row number variable is not incremented

According to this page, it is unsupported. Though most of us have used it inside of an <apex:repeat> without problems, I suspect that the VF engine works differently in an <apex:...
4 votes
Accepted

Scrolling in Pageblocktable

Quickest way to do this would be to use StickyTableHeaders. (Most reliable solution I have used) and provides the most standard like UI compared to other solutions. Datatables.net is also a great ...
  • 53.6k
4 votes
Accepted

Attempt to de-reference a null object - Wrapper list

The only value that can be null at the line you indicate is wrapAccountList and that is entirely possible even if it was initialised earlier because it is marked as transient and so will not have its ...
  • 133k
4 votes

Rowspan with apex repeat

Examples such as this one HTML rowspan Attribute reduce the number of td elements in the following rows (as rowspan is effectively saying use the content from the previous row). So you need to ...
  • 133k
4 votes
Accepted

Visualforce Display and Hide Fields

You could remove apex:PageBlockSection and then add rendered condition in apex:column for 3rd pageBlockTable as follows <apex:pageBlock> <apex:pageBlockTable value="{!AFields}" var="...
4 votes
Accepted

SelectList in PageBlock Table is not working as expected

The issue you are having is here: <apex:pageBlockTable value="{!lineItems}" var="items" > ... <apex:column headerValue="Select Commodity"> ...
  • 66.8k
3 votes

Sorting a pageBlockTable on a VF page

Please see ORDER BY for specifics, but basically, somewhere in your code, you have a line of code that probably looks like: List<Training_Certification__c> trainCertRecords = [SELECT Id, ...
  • 462k
3 votes

SOQL Inner query pageblocktable

There can be two solutions Apex based:- retrieve all related records in apex and then perform aggregation in apex. Basically, extract all required records and their references (completed or ...
  • 2,589
3 votes
Accepted

Sorting apex:pageblocktable

Follow the steps in this link to fix the sorting on apex:pageblocktable. It uses the jQuery tablesorter plugin to sort the table client-side. <apex:page standardController="Opportunity" tabStyle="...
  • 13.5k
3 votes

Export Visualforce Page in Excel as .xlsx and not as a Web Page.

The content of the page must be tabular format to be displayed as excel file. You can make sure of that as follows Remove the sfdc html/style coponents <apex:page standardStylesheets="false" ...
  • 2,293
3 votes
Accepted

Change the color of the rows in the table

You can use style attribute for the column cell as: <apex:column value="{!school.Student_to_Teacher_ratio__c }" headerValue="Student to Teacher ratio" style="{!IF(school....
  • 22.4k
3 votes
Accepted

Select Records in pageblocktable using a checkbox

There is a very good example by Jeff. You can take reference. Controller Code public with sharing class PagingController { List<categoryWrapper> categories {get;set;} // instantiate ...
3 votes

Is there a way to create something like apex:pageBlock using Lightning Components

The short answer to your question is this: there is no analog to apex:pageBlock or its child tags in Lightning Components. As you know, the pageBlock family of tags in Visualforce gave developers ...
  • 19.4k
3 votes
Accepted

Adding Child query to related query

To query for child CaseComment records in your extension: oppCases = [SELECT (SELECT CommentBody FROM CaseComments) FROM Case WHERE ...]; Then in your markup: <apex:repeat value="{!cases}" var="...
  • 147k
3 votes
Accepted

Include radio button for each row in PageblockTable

Few days back I also have same problem. To resolve I use below steps: I created an inner class in which I store the name (Label of Radio button). class ContactName { String name; } Create a ...
3 votes
Accepted

Radio button not in sync with each other

You have List with one radiobutton element for each record. Try to use html : <apex:pageBlockTable value="{!account.Cases}" var="exscases"> <apex:column headervalue="Cases"> <...
  • 4,095
3 votes
Accepted

Pageblocktable to be rendered as table in PDF

The PDF renderer sensibly skips a lot of styling as the usual Visualforce look isn't something that you're going to want on paper. The pageBlockTable should work but in these situations I do prefer ...
  • 25.1k
3 votes
Accepted

question on using pageblocksection

I am not sure what is inside your interviewSkillReviews in your controller class. But in order to achieve your result, you will need something like this. In your apex controller: List<skillHelper&...
  • 12.9k
3 votes
Accepted

Capitalizing 1st character of each word in <apex:pageblockTable

It should be possible to manipulate a single value using just merge syntax: <apex:column value="{!UPPER(LEFT(mw.name, 1)) & MID(mw.name, 2, LEN(mw.name))}" /> Here is a more elegant ...
  • 147k
3 votes
Accepted

How to dynamically create a blank row in apex:pageBlockTable if the List is blank

If you want to display a message, you can easily do that as below. Use a <apex:outputText to show the message and rendered it based on the list size rendered="{!contacts.size==0}". I used an HTML &...
  • 14.2k
3 votes
Accepted

Maintaining state across dynamically generated pageBlockTables

I have a feeling it may have to do with the fact that you are declaring an <apex:variable /> inside the repeater. I changed the object model a little and that is no longer necessary. This ...
  • 997

Only top scored, non community-wiki answers of a minimum length are eligible