What is the difference between partialSubmit and autoSubmit in JSF?

AppleGrew picture AppleGrew · Sep 2, 2011 · Viewed 20.5k times · Source

I guess I knew the difference, but right now I find myself confused. :P

Both of them seem to be do the same thing, except that partialSubmit is used on submit buttons to submit the form using AJAX and autoSubmit is used on editable components, which submits only its own contents. Am I right in saying this?

Answer

Billy Bob Bain picture Billy Bob Bain · Sep 8, 2011

The accepted answer isn't 100% correct for ADF. The partialTriggers attribute is involved in the lifecycle.

From Enabling Partial Page Rendering Declaratively

The autoSubmit attribute on an input component and the partialSubmit attribute on a command component are not the same thing. When partialSubmit is set to true, then only the components that have values for their partialTriggers attribute will be processed through the lifecycle. The autoSubmit attribute is used by input and select components to tell the framework to automatically do a form submit whenever the value changes. However, when a form is submitted and the autoSubmit attribute is set to true, a valueChangeEvent event is invoked, and the lifecycle runs only on the components marked as root components for that event, and their children. For more information, see Section 4.4, "Using the Optimized Lifecycle".