Package org.strecks.form.impl

Examples of org.strecks.form.impl.Person


    genders.put(1L, new Gender(1L, "male"));
    genders.put(2L, new Gender(2L, "female"));

    selectForm.setAvailableGenders(genders);

    Person person = new Person();
    person.setName("me");

    BindAnnotationReader bindablesReader = new BindAnnotationReader();
    BindConvertInfo bindConvertInfo = bindablesReader.readBindables(selectForm);
    Map<String, BindHandler> map = bindConvertInfo.getBindMap();
     
View Full Code Here


    genders.put(2L, new Gender(2L, "female"));
    selectForm.setAvailableGenders(genders);

    selectForm.setSelectedGender("1");

    Person person = new Person();
    person.setName("me");
    selectForm.setPerson(person);
   
    delegator.bindInwards(null);

    // now see whether binding has worked
    assert person.getGender().getId() == 1;

  }
View Full Code Here

  @Test
  public void testSelectOutwardBinding() throws Exception
  {

    Person person = new Person();
    person.setName("me");
    person.setGender(new Gender(2L, "male"));
    selectForm.setPerson(person);

    delegator.bindOutwards(null);

    assert selectForm.getSelectedGender().equals("2");
View Full Code Here

    genders.put(2L, new Gender(2L, "female"));
    selectForm.setAvailableGenders(genders);

    selectForm.setSelectedGender("1");

    Person person = new Person();
    person.setName("me");

    delegator.bindInwards(null);

    // now see whether binding has worked
    assert person.getGender() == null;

  }
View Full Code Here

  @Test
  public void testNullSelectOutwardBinding() throws Exception
  {

    Person person = new Person();
    person.setName("me");
    person.setGender(new Gender(2L, "male"));

    // don't set anything to bind to
    // selectForm.setPerson(person);
    selectForm.setSelectedGender("1");
     
View Full Code Here

TOP

Related Classes of org.strecks.form.impl.Person

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.