Package org.springframework.binding.form

Examples of org.springframework.binding.form.HierarchicalFormModel


     * {@link org.springframework.richclient.form.AbstractForm#addChildForm(org.springframework.richclient.form.Form)}.
     */
    public void testAddChildForm() {
        TestBean testBean = new TestBean();
        testBean.setNestedProperty(new TestBean());
        HierarchicalFormModel model = new DefaultFormModel(testBean);
        ValidatingFormModel childModel = FormModelHelper.createChildPageFormModel(model, "test", "nestedProperty");
        AbstractForm form = new TestAbstractForm(model);
        form.addChildForm(new TestAbstractForm(childModel));
    }
View Full Code Here


        }
        catch (IllegalArgumentException exp) {
            // should have happened
        }

        HierarchicalFormModel parentModel = new DefaultFormModel();
        assertNull(FormModelHelper.getChild(parentModel, "testChildName"));

        final ValidatingFormModel childFormModel = FormModelHelper.createFormModel(new Object(), "testChildName");
        parentModel.addChild(childFormModel);

        assertNotNull(FormModelHelper.getChild(parentModel, "testChildName"));
        assertNull(FormModelHelper.getChild(parentModel, "bogusChildName"));
    }
View Full Code Here

  }

  @Override
  protected Binding doBind( final JComponent control, final FormModel formModel, final String formPropertyPath, Map context ) {
    //Create the child model
    HierarchicalFormModel childModel = createFormModel( formModel, formPropertyPath );
    ( ( HierarchicalFormModel ) formModel ).addChild( childModel );

    //Create the form
    Form form = createForm( childModel );
    control.add( form.getControl(), BorderLayout.CENTER );
View Full Code Here

TOP

Related Classes of org.springframework.binding.form.HierarchicalFormModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.