← RichFaces FAQ ← RichFaces Components FAQ ← Input and select components
inplaces components provides onviewactivated event. But it's fired every time the user goes from edit mode to view, including cancel the edit. So if you using that event to store value - unnesessary requests fired. There is no onchange support for component in 3.3.x so you need to use workaround to check if the value was actually changed.
<a4jupport event="onviewactivated" onsubmit="if (event.memo.oldvalue!=event.memo.value) return false;"/>
or
<rich:inplaceInput value="#{bean...}" showControls="true" onviewactivation="old = event.memo.oldValue;">
<a4j:support action="#{action...}" ajaxSingle="true" event="onviewactivated" onsubmit="if (event.memo.value == old) return false;" />
</rich:inplaceInput>
Comments