You need to sign in to do that
Don't have an account?
dmcheng
actionSupport not working?
Hello. I have a VF page showing a list of records in a pageblocktable. I have an inputText field on the page where the user can enter a value to filter the list. When the user enters the value, I'll re-query the data and rerender the pageblocktable.
I'm trying to use actionRegion and actionSupport for this, but it's not working. The filterByName method never gets called.
Can anyone tell me what I'm doing wrong? Does it have to do with onChange, or with the form submission process? There are no other input fields on the page.
Here's a snippet of the VF page:
Here's a snippet from the controller:
I'm trying to use actionRegion and actionSupport for this, but it's not working. The filterByName method never gets called.
Can anyone tell me what I'm doing wrong? Does it have to do with onChange, or with the form submission process? There are no other input fields on the page.
Here's a snippet of the VF page:
<apex:form > <div class="ccx-list-header"> <div class="ccx-advocate-buttons" id="bulkListActions"> <apex:actionRegion immediate="true"> <apex:inputText value="{!searchName}" html-placeholder="Search for advocate"> <apex:actionSupport action="{!searchAdvocate}" reRender="advocateListTable" event="onchange" /> </apex:inputText> </apex:actionRegion> </div> </div> </apex:form>
Here's a snippet from the controller:
public class MyController { public String currentDeskId; public String searchName { get; set; } public List<CCx_AdvocateServices.onboardingAdvocateDecorator> advocates { get; set; } public void filterByName() { system.debug('*** searchName: ' + searchName); if (string.isBlank(searchName)) return; advocates = CCx_AdvocateSelector.selectAdvocateDecoratorForDeskAndName(currentDeskId, searchName); system.debug('*** advocates: ' + advocates); searchName = null; } // Constructor // etc }
The Id of the section you are rerendering should be the one which contains the values returned to the page after the filter is applied.