Wednesday 15 August 2012

Html Table With Fixed Header

This is a very common requirement in most of the cases where we want a HTML Table with fixed header, horizontal and vertical scroll bar for body. Many times i have seen people struggling with this implementation. There are number of solutions on web but no solution is upto the mark in terms of cross browser compatibility. I have managed to find a jquery based solution which is very easy to implement and is tested in Firefox, Chrome, Safari, Opera, IE (7,8,9). Click Here to download the code. I hope this helps  :)

Wednesday 6 June 2012

Displaying mini pagelayout in Vf page


Hello,

Here is the code snippet which we can use display mini page layout in visual force page. You just need to replace the "RECID" with actual SF record Id.

 <apex:page>
    <a href="/RECID" id="lookupRECID" onblur="LookupHoverDetail.getHover('lookupRECID').hide();" onfocus="LookupHoverDetail.getHover('lookupRECID', '/RECID/m?&amp;isAjaxRequest=1&amp;nocache=1338963113197').show();" onmouseout="LookupHoverDetail.getHover('lookupRECID').hide();" onmouseover="LookupHoverDetail.getHover('lookupRECID', '/RECID/m?isAjaxRequest=1&amp;nocache=1338963113197').show();">Record Name</a>
</apex:page>

Try, its fun...

Sunday 1 April 2012

Issue with the salesforce datepicker when it is used in Modal window

I have come across this issue quiet often during project work where the SF date picker is displayed below the Modal window, which is very annoying. The reason for this issue is Z-Index for Modal window is higher then the Z-Index of SF date picker. The solution for this issue is include the SF date picker class in your page and increase the Z-Index to 9999 which is more then the Modal window Z-Index. refer the same code below:
 <apex:page>
<style type="text/css">
.datePicker {
    z-index: 9999;/*Changed this css property which was 100 prior*/
    position: absolute;
    display: none;
    top: 0;
    left: 0;
    width: 17em;
    background-color: #b7c6b2;
    border-bottom: 1px solid #000;
    border-right: 1px solid #000;
    margin: 0;
    padding: 1px 1px 2px 2px;
}
</style>
<div class="popup">
<apex:inputfield value="{!AnyDateField}"/>
</div>
</apex:page>






Monday 5 March 2012

Custom multipicklist

I came across this scenario in my project work where we had to bind the wrapper class field with the page instead of field from salesforce object and that field needed to display in the multipicklist form, here is an sample code to create custom multipicklist. 

Learning Jquery

In order to learn and to work with jquery, we need to hunt for syntax across the web, here I am attaching a simple PDF which is nothing but clustering of all the basic information (available on web) required to learn jquery, this is will help you to learn and work with jquery easily. This pdf contains simple and basic syntax of jquery along with description and a simple example.