1

Following is the VisualForce code snippet:

<apex:selectCheckboxes value="{!users}" layout="pageDirection">
                    <apex:actionSupport event="onselect" action="{!checkSelectList}" reRender="Panel1"/>
                    <apex:selectOptions value="{!userOptions}"/>
</apex:selectCheckboxes>

I have tried onselect, onclick, onchange events but nothing has triggered my apex class function checkSelectList. What am I missing here?

0

Try doing below.

<apex:selectCheckboxes value="{!users}" layout="pageDirection">
    <apex:selectOptions value="{!userOptions}"/>
    <apex:actionSupport event="onselect" action="{!checkSelectList}" reRender="Panel1"/>
</apex:selectCheckboxes>

Please let us know if this has helped you out.

Thanks!

Edit Check the below snippet

<apex:pageBlockSectionItem id="rectypesec" rendered="{!IF( Case.ContactId == NULL, false , IF(isUpdate,false,true))}">
        <apex:outputLabel value="Case Record Type"/>
        <apex:actionRegion >
        <apex:selectList value="{!selectedRecType}" id="rectypeid" size="1">
        <apex:selectOptions value="{!recTypeOption}"/>
        <apex:actionSupport event="onchange" action="{!GetTypeValues}" reRender="mainPage" status="loadingStatus2"/>
        </apex:selectList>
        <apex:actionStatus id="loadingStatus2">
        <apex:facet name="start">
        <apex:image url="/img/loading.gif" style="width: 20px; height: 20px;" />
           </apex:facet>
        </apex:actionStatus>
       </apex:actionRegion>
     </apex:pageBlockSectionItem>
     <apex:pageBlockSectionItem id="rectypesec2" rendered="{!IF(isUpdate,true,false)}">
         <apex:outputLabel value="Case Record Type"/>
         <apex:outputField value="{!caseObj.RecordTypeId}"/>
     </apex:pageBlockSectionItem>
| improve this answer | |
  • Nop. Nothing happened! I'll post my controller function too below: public PageReference checkSelectList() { System.debug('Selected-------------'); Selection1=selections[0]; return null; } – Zarq Iqbal Aug 13 '15 at 10:10
  • it is not even calling the controller function so esentially actionSupport is not working. – Zarq Iqbal Aug 13 '15 at 10:13
  • Any reason that you have used apex:selectcheckboxes in V.f page here ? What kind of value are you passing in !Users ? Can you post a bit more part of your code. – Ruchi Aug 13 '15 at 11:02
  • All the users in that particular salesforce organization. Anyways the selectCheckboxes are working fine. Does actionSupport work with selectCheckboxes? Which components are supported by actionSupport? – Zarq Iqbal Aug 13 '15 at 11:20
  • I have used apex:selectList with actionsupport. It works perfectly fine. Try taking the users in the list once. See if it works – Ruchi Aug 13 '15 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.