You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Martin Marinschek <ma...@gmail.com> on 2006/01/27 11:18:14 UTC

Partial Validation / Model Update

Hi all,

together with Gerald Müllan, I've put the finishing touchs on our
partial validation / model update stuff.

there is an example under sandbox / subForm.jsp to try it out.

Basically, I've done what Adam and Bernd have suggested, and created a
new subForm component. Kudos to them for their input.

Now what's possible with our approach?

Basic functionality:

if you include such a subForm component in your page, only
buttons/links which are children of the subForm will cause the
validation/model update for all child-components of this subForm to
happen. So you can effectively disable validation/modelUpdate for any
buttons out of this form.

Extended functionality:

if you use t:commandButton or t:commandLink, you now have an actionFor
attribute. With this actionFor-attribue, you can link to a specific
subform (just put the id of the referenced form in there), and cause
the validation and update model of this subform to be triggered.

you additionally have a actionForPhase attribute on the extended
command components. With this actionForPhase attribute, you can select
_which_ phase will be triggered. So now you can e.g. decide if only
validation of a subForm shall happen, or only model update (aka:
optional validation).

Mike, Jesse, I'd love to hear how that could possibly interact or
provide additional value to the optional validator framework...

regards,

Martin

--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces