PageBlockTable Enhancer - A Awesome New Visualforce Component



If you are going through my blog, few days back I pushed a new version of a Enchanced Pageblock Table. The main draw back of this component is to you have to modify your existing controller to provide the FieldList to the component.

But what If I give a new plugin that can work on existing Page block tables and that to without any code changes in the controller ?

So here is the initial version of The PageblockTableEnhancer, that can be included into existing page to enhance your existing PageBlockTables. Just include the component into the page and specify Ids of the target PageblockTable in csv format.

Features
Currently PageblockTableEnhancer  only supports sorting. You can apply sorting feature to any number of tables in a page by using a single PageblockTableEnhancer  component.

How to use?

Parameter :

  • targetPbTableIds : comma-separated Ids of the target Pageblock tables




 <c:PageBlockTableEnhancer targetPbTableIds="mid,mid2"/>    
   <apex:pageBlock >  
       <apex:pageBlockTable value="{!accounts}" var="acc" id="mid">  
         <apex:column value="{!acc.Name}"/>  
       </apex:pageBlockTable>   
        <apex:pageBlockTable value="{!accounts}" var="acc" id="mid2">  
         <apex:column value="{!acc.Name}"/>  
       </apex:pageBlockTable>     
   </apex:pageBlock>  


Enhanced Page Block Tables



Codebase:




No comments:

Post a Comment