You need to sign in to do that
Don't have an account?

Filter not working when checkbox exists in record listing
Hi,
I have added a filter on records. It is not working when I add checkbox in the list.
My visualforce Page
Apex code is:
Thanks,
Rohitash
I have added a filter on records. It is not working when I add checkbox in the list.
My visualforce Page
<apex:page standardController="Line_Item__c" extensions="LineItemPackagesExtensions" recordSetVar="lineitems" > <apex:pageBlock title="Search for Packages"> <apex:outputLabel >Packages Category</apex:outputLabel> <apex:inputField value="{!prdcat.Product_Category__c}" > <apex:actionSupport event="onchange" rerender="packagesList" action="{!filterPackages}"/> </apex:inputField> <apex:outputPanel id="packagesList"> <apex:pageBlockTable value="{!Packages}" var="a"> <apex:column value="{!a.Name}"/> <apex:column value="{!a.Product_Category__c}"/> <apex:column value="{!a.Cost__c}"/> <apex:column value="{!a.Stay__c}"/> <apex:column value="{!a.Activity__c}"/> <apex:column value="{!a.Description__c}"/> </apex:pageBlockTable> </apex:outputPanel> </apex:pageBlock> </apex:page>
Apex code is:
public class LineItemPackagesExtensions { public Package__c pkgs; public List<Package__c> Packages { get; set; } public Package__c prdcat{get;set;} public LineItemPackagesExtensions(ApexPages.StandardSetController controller) { Packages = [SELECT Name,Product_Category__c,Cost__c,Stay__c,Activity__c,Description__c FROM Package__c ]; } public List<Package__c> getPackages(){ Packages = [SELECT Name,Product_Category__c,Cost__c,Stay__c,Activity__c,Description__c FROM Package__c ]; return Packages; } public void filterPackages() { Packages = [SELECT Name,Product_Category__c,Cost__c,Stay__c,Activity__c,Description__c FROM Package__c where Product_Category__c=:prdcat.Product_Category__c ]; } }
Thanks,
Rohitash