+ Start a Discussion
satheesh psatheesh p 

Formula Expression is required on the action attributes when checkbox clicked

Hi All,

when i try to pass value it shows Formula Expression is required on the action attributes When checkbox clicked in UI

Visual Page

                   <apex:inputcheckbox value="{!allbranch}"> 
                        <apex:actionSupport event="onchange" action="{!selectedvalue}" reRender="out"/>
                    </apex:inputCheckbox> All Branch <br/>
                    <apex:inputcheckbox value="{!branch1}"> 
                        <apex:actionSupport event="onchange" action="{!selectedvalue}" reRender="out"/>
                    </apex:inputCheckbox> branch1<br/>

Apex

public boolean allbranch{get;set;}
 public boolean branch1{get;set;}​

public String selectedvalue(){
        String query = '';
        if(allbranch == true)
        {
          // System.debug('Ouput Value---------------------------- allbranch'+allbranch);
           query = '';
        }
        if(branch1== true)
        {
           //System.debug('Ouput Value---------------------------- '+branch1);
           query = 'Branch__c = XXXX';
        }
       System.debug('*************************************query Value ---'+query);
        return query;       
    }
       
    public PageReference pageLoad() {
       city = selectedvalue();
       //System.debug('Selected city:------------------------ '+city);
}

Can any one try to resolve this problem.

Thank you..
SandhyaSandhya (Salesforce Developers) 
Hi,

This error may occur if your redirecting user to some other page using pageReference method and if you forgot to mention forward slash. 

pageReference paq = new pageReference('apex/somecontrollername');  // you will get error 

pageReference paq = new pageReference('/apex/somecontrollername'); // this will work 
 
As I can see, there is a page reference method in your code.


Thanks and Regards
Sandhya


 
AthiSachiAthiSachi
Hello there,

Do you find any solution? i have exact problem