This Version is no more actively developed and is deprecated. But we have developed two more Alternatives for the same which are much more fun and easy to implement
How many times you have tried to create a Sort-able Page block table?
Well I personally tried the same lot of time but never got a plug n play solution, this always ended up with lots of changes in my controller class.
There are lot of work around Dynamic SOQL,Order by statement, List Sorting etc. Well most of them requires a lot of coding and changes in the visualforce page.
Most of time we need to display just a small list of sortable data ,to implement the same I guess writing apex classes and code is not a good idea.
So I tried writing visualforce component which uses jQuery table sorter to do the job.Well this component is very naive stage and needs some obvious enhancement like, ability to specify which fields to sort, proper images to display the sorting order.
How to use the component?
Parameters
sObjList : List of sObject To display
fieldList : List of field API names to display in the table as column.
sObjList : List of sObject To display
fieldList : List of field API names to display in the table as column.
<c:SortablePageBlockTable sObjList="{!accounts}" fieldList="{!fields}"/>
This Version is no more actively developed and is deprecated. But we have developed two more Alternatives for the same which are much more fun and easy to implement
Demo.
You can check the live demo from here(http://blogforce9dev-developer-edition.ap1.force.com/SortablePageblocktable)
Package/Installation
You can use this package to install the same in your org https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000M3iZ
looks good but just curious any reason to have those * character instead of legendary up and down images..:)
ReplyDelete@jatin actually tried doing the easiest way. Will be adding the up and down images sometime later. Thanks for the suggestion!
DeleteNo prob.. you have manage the need of the hour!!.. cosmetic changes are jst not important :)
Delete@jatin well those enhancements are already in the plan. Will be porting them soon.
Delete@jatin I have made changes and now you can see the legendary up and down images in the component :). Check my latest post.
DeleteHey can you tell me how to call the component from Visual force page?When I am giving it is throwing error- Unknown property 'fields' referenced in SortJQuesry
ReplyDeleteWell this is not the latest version that you are trying with. You can try the latest version from here(http://blogforce9.blogspot.in/2012/08/sort-able-pageblock-table-component-for_23.html). From the error seems like you are using IE8. Currently there are some problem with IE8 can you please check and confirm the same in other browser like chrome/firefox
DeleteI am using case standard controller page to post from list view I am not getting any results. what am I doing wrong? My page VF page is posted from case list view
ReplyDeletesobject="{!selected}" fieldlist="{!case.Id}
ReplyDeleteselected is the name of the list view
Probably this component will not work with a standard controller.
DeleteYou have to do something like this
Parameters
sObjList : List of Cases To display
fieldList : List of field API names to display in the table as column.
It seems not to work with Date fields.
ReplyDeleteNot working with boolean values too....
ReplyDeleteHi...
ReplyDeleteI am using PageBlockTableEnhancerADV in my prjoect.
I have issue with the table links CSV,EXEL,PDF
I am Displaying three tabel and i am using the component the links are not working