{
if (form == null)
{
// try to find form in the hierarchy of owning component
Component component = getComponent();
form = (Form)component.findParent(Form.class);
if (form == null)
{
throw new IllegalStateException(
"form was not specified in the constructor and cannot "
+ "be found in the hierarchy of the component this behavior "