Examples of BindConvertInfo


Examples of org.strecks.bind.internal.BindConvertInfo

    bindable.setNestedBindableBean(nested);
    bindable.setIntegerValue("5");

    BindAnnotationReader bindablesReader = new BindAnnotationReader();
    BindConvertInfo bindConvertInfo = bindablesReader.readBindables(bindable);
    Map<String, BindHandler> map = bindConvertInfo.getBindMap();
     
    assert map.size() == 2;

    BindHandler b = map.get("integerValue");
View Full Code Here

Examples of org.strecks.bind.internal.BindConvertInfo

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

    BindAnnotationReader bindablesReader = new BindAnnotationReader();
    BindConvertInfo bindConvertInfo = bindablesReader.readBindables(selectForm);
    Map<String, BindHandler> map = bindConvertInfo.getBindMap();
     
    assert map.size() == 1;

    BindHandler b = map.get("selectedGender");
View Full Code Here

Examples of org.strecks.bind.internal.BindConvertInfo

{

  public static DelegatingForm getDelegatingForm(ActionForm form)
  {
    BindAnnotationReader bindReader = new BindAnnotationReader();
    BindConvertInfo bindConvertInfo = bindReader.readBindables(form);
 
    DelegatingForm delegator = new DelegatingForm(form);
    delegator.setBindConvertInfo(bindConvertInfo);
   
    ValidationAnnotationReader reader = new ValidationAnnotationReader();
View Full Code Here

Examples of org.strecks.bind.internal.BindConvertInfo

    simpleForm = new SimpleStrutsForm();
    bindHandler = createStrictMock(BindHandler.class);
    Map<String, BindHandler> map = new HashMap<String, BindHandler>();
    map.put("prop", bindHandler);

    BindConvertInfo bci = new BindConvertInfo(map, new HashMap<String, Converter>(), new DefaultConversionHandler());

    form = new DelegatingForm(simpleForm);
    form.setBindConvertInfo(bci);

  }
View Full Code Here

Examples of org.strecks.bind.internal.BindConvertInfo

  }

  @Test
  public void testGetConversionHandler() throws Exception
  {
    BindConvertInfo bci = createStrictMock(BindConvertInfo.class);
    ConversionHandler conversionHandler = createStrictMock(ConversionHandler.class);

    ValidationAnnotationReader reader = new ValidationAnnotationReader();

    expect(bci.getConversionHandler()).andReturn(conversionHandler);
    replay(bci);
    replay(conversionHandler);

    assert reader.getConversionHandler(bci) == conversionHandler;
View Full Code Here

Examples of org.strecks.bind.internal.BindConvertInfo

  @SuppressWarnings("unchecked")
  @Test
  public void testGetConverterNone() throws Exception
  {
    BindConvertInfo info = createStrictMock(BindConvertInfo.class);
    Map converterMap = createStrictMock(Map.class);
    Converter converter = createStrictMock(Converter.class);

    ValidationAnnotationReader reader = new ValidationAnnotationReader();

    expect(info.getConverterMap()).andReturn(converterMap);
    expect(converterMap.get("prop")).andReturn(converter);

    replay(info);
    replay(converterMap);
View Full Code Here

Examples of org.strecks.bind.internal.BindConvertInfo

    Assert.notNull(form);
    Assert.notNull(request);

    Class formClass = getFormClass(form);

    BindConvertInfo bindConvertInfo = null;
    synchronized (bindConvertMap)
    {
      bindConvertInfo = bindConvertMap.get(formClass);
      if (bindConvertInfo == null)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.