Examples of bind()


Examples of org.springframework.mock.jndi.SimpleNamingContextBuilder.bind()

    jtam.setTransactionManager(tm);
    jtam.setRollbackOnCommitFailure(true);
    jtam.afterPropertiesSet();

    SimpleNamingContextBuilder jndiEnv = SimpleNamingContextBuilder.emptyActivatedContextBuilder();
    jndiEnv.bind(JtaTransactionManager.DEFAULT_USER_TRANSACTION_NAME, ut2);
    JtaTransactionManager serializedJtatm =
        (JtaTransactionManager) SerializationTestUtils.serializeAndDeserialize(jtam);
   
    // should do client-side lookup
    assertNotNull("Logger must survive serialization", serializedJtatm.logger);
View Full Code Here

Examples of org.springframework.richclient.form.binding.Binder.bind()

    }
   
    public Binding createBinding(String formPropertyPath, Map context) {
        Assert.notNull(context, "Context must not be null");
        Binder binder = getBinderSelectionStrategy().selectBinder(formModel, formPropertyPath);
        Binding binding = binder.bind(formModel, formPropertyPath, context);
        interceptBinding(binding);
        return binding;
    }

    public Binding createBinding(Class controlType, String formPropertyPath, Map context) {
View Full Code Here

Examples of org.springframework.richclient.form.binding.swing.EnumRadioButtonBinder.bind()

            JPanel panel = new JPanel(new FormLayout("center:pref", "pref,3dlu,pref,3dlu,pref,3dlu, pref"));
            CellConstraints cc = new CellConstraints();

            panel.add(new JLabel(getMessage("radioButtonEnumForm.smallEnum.label")), cc.xy(1, 1));
            EnumRadioButtonBinder binder = new EnumRadioButtonBinder();
            Binding binding = binder.bind(getFormModel(), "smallEnum", Collections.EMPTY_MAP);
            panel.add(binding.getControl(), cc.xy(1, 3));

            panel.add(new JLabel(getMessage("radioButtonEnumForm.nullableEnum.label")), cc.xy(1, 5));
            binder = new EnumRadioButtonBinder();
            binder.setNullable(true);
View Full Code Here

Examples of org.springframework.richclient.form.binding.swing.NumberBinder.bind()

    formBuilder.addPropertyAndLabel("contactType");
    formBuilder.nextRow();
        NumberBinder binder = new NumberBinder();
        binder.setLeftDecoration("€");
        formBuilder.addLabel("monthlyIncome");
        formBuilder.addBinding(binder.bind(getFormModel(), "monthlyIncome", new HashMap()), 3);
    formBuilder.nextRow();
    formBuilder.addHorizontalSeparator("Address", 7);
    formBuilder.nextRow();
    formBuilder.addPropertyAndLabel("address.address1");
    formBuilder.nextRow();
View Full Code Here

Examples of org.springframework.richclient.form.binding.swing.TextComponentBinder.bind()

            protected JComponent createFormControl() {
                TableFormBuilder builder = new TableFormBuilder(getBindingFactory());
                TextComponentBinder binder = new TextComponentBinder();
                binder.setDocumentFactory(new RegExDocumentFactory(pattern, upperCaseOnly));
                builder.add(binder.bind(getFormModel(), "value", Collections.emptyMap()), "rowSpec=fill:default:grow");
                return builder.getForm();
            }
        }
    }
View Full Code Here

Examples of org.springframework.tests.mock.jndi.SimpleNamingContext.bind()

  }

  @Test
  public void nameBoundWithoutPrefix() {
    final SimpleNamingContext context = new SimpleNamingContext();
    context.bind("p1", "v1");

    JndiTemplate jndiTemplate = new JndiTemplate() {
      @Override
      protected Context createInitialContext() throws NamingException {
        return context;
View Full Code Here

Examples of org.springframework.tests.mock.jndi.SimpleNamingContextBuilder.bind()

  public void testBeanFactoryPathFromJndiEnvironmentWithSingleFile() throws Exception {
    SimpleNamingContextBuilder sncb = SimpleNamingContextBuilder.emptyActivatedContextBuilder();

    // Set up initial context
    sncb.bind(BEAN_FACTORY_PATH_ENVIRONMENT_KEY, COLLECTIONS_CONTEXT);

    ContextJndiBeanFactoryLocator jbfl = new ContextJndiBeanFactoryLocator();
    BeanFactory bf = jbfl.useBeanFactory(BEAN_FACTORY_PATH_ENVIRONMENT_KEY).getFactory();
    assertTrue(bf.containsBean("rod"));
    assertTrue(bf instanceof ApplicationContext);
View Full Code Here

Examples of org.springframework.validation.DataBinder.bind()

      }
    };
    binder.initDirectFieldAccess();
    PropertyEditorUtil.registerUimaFITEditors(binder);
    binder.setRequiredFields(mandatoryValues.toArray(new String[mandatoryValues.size()]));
    binder.bind(values);
    if (binder.getBindingResult().hasErrors()) {
      StringBuilder sb = new StringBuilder();
      sb.append("Errors initializing [" + component.getClass() + "]");
      for (ObjectError error : binder.getBindingResult().getAllErrors()) {
        if (sb.length() > 0) {
View Full Code Here

Examples of org.springframework.web.bind.ServletRequestDataBinder.bind()

            String handlerName = (String) object;
            object = getApplicationContext().getBean(handlerName);
        }

        ServletRequestDataBinder binder = new ServletRequestDataBinder(object, null);
        binder.bind(request);
        return object;
    }

}
View Full Code Here

Examples of org.springframework.web.bind.WebDataBinder.bind()

    }

    private BindingResult bindAndValidate(HttpServletRequest request, Object formObject) {
        WebDataBinder binder = new WebDataBinder(formObject);
        binder.setValidator(validator);
        binder.bind(new MutablePropertyValues(request.getParameterMap()));
        binder.getValidator().validate(binder.getTarget(), binder.getBindingResult());
        return binder.getBindingResult();
    }

    private void initMessageSourceForFeedbackMessage(String feedbackMessageCode) {
View Full Code Here
TOP
Copyright © 2015 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.