issue 1663

From: Sheetal Vartak <>
Date: Fri, 29 Oct 2010 13:37:37 -0700

Hi Jason,

This fix is for making sure that the htmlcommandbutton/commandlink components are always wrapped inside a form.

The basic idea is to make sure that the component is an instance of ActionSource/ActionSource2 or EditableValueHolder.
Next if the above is true, then check if the parent hierarchy of the component has a form in it. If it does not, then for the case where the parent is either a UIPanel, UINamingContainer,UIColumn or UIData, store a value against MAKE_SURE_ANCESTOR_IS_FORM as true. If the parent is not one of the above and there is no form in the parent hierarchy, then display the message.
Next time, when one of the above components is a child, we inspect MAKE_SURE_ANCESTOR_IS_FORM. If true, check now to see if form is in hierarchy. If not, display the message.

 I am using the FacesContext to store a boolean "MAKE_SURE_ANCESTOR_IS_FORM" which is set if the child component's parent is either UIPanel or UIData or UINamingContainer.

The jsfdemo scrumtoys app and the admin gui related pages (ezcomp02) work fine with this fix. Also all the devtests pass.

Please visit for the changes.