Tag Archives: actionsupport

Visualforce onchange event not working?

Simple post here

I had a VF page where the onchange event within a pageBlockTable column cell wasn’t executing

<apex:column headerValue="some hdr">
  <apex:actionRegion >
    <apex:inputField value="{!r.foo}">
	<apex:actionSupport event="onChange" rerender="thePageBlockTableId"/>
    </apex:inputField>
  </apex:actionRegion>	
   <apex:inputField value="{!r.bar}" rendered="{!r.foo <> 'xyz'}"/>
</apex:column>

When I click on the cell for the foo column and change the inputField, the pageBlockTable does not rerender

Huh?

Problem is that unlike most of Apex and Visualforce, the event attribute values are case sensitive.

Solution?

replace event="onChange" with event="onchange"

Some additional information on case senstivity in Apex and Visualforce can be found here