Redkite News & Opinion

Floating/Sticky Headers For Visualforce PageBlockTable

By daniel on March 21, 2013

Hey everyone, it’s Dan/Kenji, Senior Developer for Redkite here with a nifty solution to an ever so annoying problem. That is of course that headers of a pageblocktable in Visualforce do not remain visible if you put the table in a scrollable area. I know there are a few approaches on how exactly to best pull this off, but they always seemed too complicated and not very reliable. So I decided to just bite the bullet and write a nice reusable jQuery plugin to take care of it for you. First off, to make sure we are talking about the same thing and what I’m proposing if what you want, check out the demo link below.


Demo of Sticky/Floating Headers

If you like what you see, you can download the plugin here.

Download jQuery Plugin

Upload it as a static resource, or just copy paste the contents into your visualforce page. Either way is fine. Also, in your visualforce page you’ll need to include the css class .floatingStyle and set it’s position to relative. Like this

<style>      
.floatingStyle 
{ 
    position:relative; 
} 
</style>

To use it, simply put your pageblocktable inside a div or apex:outputpanel (with layout set to block). Give that container a height. Invoke the plugin on the table either by class or id. So if my pageblock tables had the styleClass of ‘floatingHeaderTable’ I could invoke it this way.


    <script>
    $(document).ready(function() {
        $('.floatingHeaderTable').vfFloatingHeaders();
    });
    </script> 

and that’s it. You are good to go. Here is a full sample page.

Visualforce Page
<apex:page controller="floatingHeadersController">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    <script src="{!URLFOR($Resource.jquery_vfFloatingHeaders)}"></script>

    <style>
        .tableContainer
        {
            height:290px; 
            width: 100%;
            overflow: auto;
        }       
        .floatingStyle 
        { 
            position:relative; 
        } 
    </style>

    <script>
    $(document).ready(function() {
        $('.floatingHeaderTable').vfFloatingHeaders();
    });
    </script>   

    <apex:pageBlock >
        <apex:outputPanel styleClass="tableContainer" layout="block">
            <apex:pageBlockTable value="{!contactList}" var="item" title="Contact List" styleclass="floatingHeaderTable" >
                <apex:column value="{!item.firstname}"/>
                <apex:column value="{!item.lastname}"/>
                <apex:column value="{!item.email}"/>
                <apex:column value="{!item.phone}"/>
            </apex:pageBlockTable>
        </apex:outputPanel>
    </apex:pageBlock>
</apex:page>

Apex Class
public class floatingHeadersController 
{
    public list<contact> contactList
    {
        get
        {
          if (contactList == null)
          {
              contactList = [select firstname, lastname, email, phone from contact];
          }  
          return contactList;
        }
        set;
    }
}

Also, I would like to give credit to a blog which helped me immensely with the technique for getting the headers to float properly. http://rajputyh.blogspot.com/2011/12/floatingfixed-table-header-in-html-page.html I just wrapped it up and modified it a bit to work with pageblocktables and packaged it into a plugin.

7 Comments »

CrunchBase Gaining as an Academic Research Tool

By Kenny on March 7, 2013

Interesting post from the CrunchBase blog noting the increasing use of CrunchBase in academic works. Remember that you can view and save CrunchBase information in Salesforce using our Cruncher app – get it now from the AppExchange.

Cruncher

T3 Happy Hour

By Kenny on February 7, 2013

If you’re in the Wealth Management business and attending the T3 Conference, join us for cocktails at the Playwright in Miami Beach on Tuesday night. Co-hosting are our friends at Orchestrate (the smart people behind ProcessComposer) and Orion Advisor Services.

Add a Comment »

What’s News in the Cloud? AppExchange Customer Choice Awards revealed, US Dept. of Energy moving to the cloud, and the effort to protect the internet from government control

By Thomas on January 25, 2013

What’s New(s) In The Cloud?


Here are some of Redkite’s favorite Salesforce.com and Cloud related tweets this month!

Salesforce.com Chairman and CEO Marc Benioff attended CES earlier this month for the Brand Matters keynote, where he spoke about “the new marketing,” disruption, and what he was even doing at CES. (Click here for a live blog of the keynote)


The AppExchange Customer Choice Awards have been revealed – see which 13 apps earned the highest reviews.


Back to the basics: the language of CRM


Activists continue to push for the United States to scale back financing the ITU after December’s World Conference on International Telecommunications in an effort to protect the internet from government control.


The US Department of Energy is looking to move to the cloud.


For a change of pace and for some tech history: During the Cold War, a pin-up girl becomes the face of “a landmark moment in computer graphics and cultural history that has gone unnoticed until now.”

Articles sourced on Twitter.com by Kate

Twitter button Share on Twitter Facebook buttonShare on Facebook LinkedIn buttonShare on LinkedIn

Redhot Salesforce.com App – RFP Manager

By Thomas on January 11, 2013

App of the Month

This month our Redhot Salesforce.com App is RFP Manager (formerly RFPForce) by Salesforce Labs. RFP Manager is perfect for Organizations that need help standardizing and maintaining answers to common questions from clients and prospects.

What is Salesforce Labs (formerly Force.com Labs)?

If you’re picturing hundreds of Force.com developers locked in a secret lair, maybe inside a hollowed-out mountain, that’s not quite what Force.com Labs is.  It’s really just an umbrella term to make it easy for anybody within salesforce.com to publish apps to the AppExchange.  There are some great apps, and they are all free, but from the horse’s mouth (emphasis ours):

Salesforce Labs apps are free to use, but are not official salesforce.com products, and should be considered community projects – these apps are not officially tested or documented.

Most apps are provided as unmanaged packages – all code can be viewed and changed as desired. This is valuable, but carries with it some hidden downsides (for example, upgrades are difficult; the more popular Labs apps come in unmanaged and managed forms because of this). We advise clients to consider deploying any Salesforce Labs app as if it was their own work:

  • Test thoroughly
  • Review all code
  • Pay special attention to the test coverage, as this will come back to haunt you if it lowers your overall coverage percentage.

What is RFP Manager?

RFP Manager is a great tool to build, organize, and quickly find responses used in creating larger documents like RFPs, RFIs, or contracts. RFP Manager also standardizes responses to help organizations be more efficient and accurate by giving the user the ability to easily search for responses to common questions. Assigning a response owner gives organizations the added benefit of maintaining the information, keeping it current and correct.

Tracking status, owner, and deadline of the document during its lifecycle is a helpful feature that provides easy visibility, reporting, and timely responses to clients.

RFP Manager has a standard lookup to the Opportunity where the tool works best for tracking RFIs, RFPs, RFQs, and SOWs to opportunities; however the Application can be customized to fit the organization’s documentation needs.

What’s Cool about RFP Manager?

The ability to quickly find common responses that are needed for creating larger documents is the best part of RFP Manager. The search function makes it easy for any user to get the information they need. When installing RFP Manager, gather all the existing information and responses currently being used within the organization and load into RFP Manager. This creates the initial library of responses. Over time the search function will improve as organizations establish more relationships between questions and responses. This is done by associating common questions with standard responses. Organizations can even report on responses to find which answers are most effective.

Who Could Benefit from about RFP Manager?

Any organization that creates proposals and contracts where responses to common questions can be reused will benefit from RFP Manager. We have a lot of Wealth Management clients regularly dealing with RFPs when pitching to foundations and endowments, and RFP Manager helps avoid reinventing the wheel each time. Many organizations have the information scattered in multiple places and need a tool that centralizes the information and gives the ability to quickly locate and update the information.

Why Redkite Likes RFP Manager?

RFP Manager provides a solution that is simple to install and easy to maintain. The search functionality is robust and not only gives the organization a helping hand finding the information but keeping it current and up to date.  Also included with the Application are tips and best practices on how to use the timeline and status features effectively. This gives visibility to existing processes and can help identify any process gaps organizations may have.

You can learn more about RFP Manager and install it for free on the Salesforce.com AppExchange.

Graciously written by Jennifer

Twitter button Share on Twitter Facebook buttonShare on Facebook LinkedIn buttonShare on LinkedIn

Add a Comment »

Older News Stories »