Examples of FormConfig


Examples of com.alibaba.citrus.service.form.configuration.FormConfig

    @Test
    public void getFormConfig() throws Exception {
        invokeGet(null);

        form = formService.getForm();
        FormConfig fc = form.getFormConfig();

        assertNotNull(fc);
        assertSame(formService, fc.getFormService());
    }
View Full Code Here

Examples of com.alibaba.citrus.service.form.configuration.FormConfig

        // 处理form import。
        if (!isEmptyArray(importFormServices)) {
            List<GroupConfigImpl> importGroups = createLinkedList();

            for (FormService importFormService : importFormServices) {
                FormConfig importFormConfig = importFormService.getFormConfig();

                for (GroupConfig importGroup : importFormConfig.getGroupConfigList()) {
                    GroupConfigImpl srcGroupConfig = (GroupConfigImpl) importGroup; // expected same implementations
                    GroupConfigImpl newGroupConfig = new GroupConfigImpl();
                    String groupName = srcGroupConfig.getName();

                    newGroupConfig.setName(groupName);
View Full Code Here

Examples of com.alibaba.citrus.service.form.configuration.FormConfig

            boolean hasMessage = false;

            // 1. 从messageSource中查找
            if (id != null && messageSource != null) {
                GroupConfig groupConfig = fieldConfig.getGroupConfig();
                FormConfig formConfig = groupConfig.getFormConfig();

                // form.groupName.fieldName.validatorId
                messageCode = formConfig.getMessageCodePrefix() + groupConfig.getName() + "." + fieldConfig.getName()
                              + "." + id;

                hasMessage = getMessageFromMessageSource() != null;
            }
View Full Code Here

Examples of com.alibaba.citrus.service.form.configuration.FormConfig

            boolean hasMessage = false;

            // 1. ��messageSource�в���
            if (id != null && messageSource != null) {
                GroupConfig groupConfig = fieldConfig.getGroupConfig();
                FormConfig formConfig = groupConfig.getFormConfig();

                // form.groupName.fieldName.validatorId
                messageCode = formConfig.getMessageCodePrefix() + groupConfig.getName() + "." + fieldConfig.getName()
                        + "." + id;

                hasMessage = getMessageFromMessageSource() != null;
            }
View Full Code Here

Examples of com.alibaba.citrus.service.form.configuration.FormConfig

        // ����form import��
        if (!isEmptyArray(importFormServices)) {
            List<GroupConfigImpl> importGroups = createLinkedList();

            for (FormService importFormService : importFormServices) {
                FormConfig importFormConfig = importFormService.getFormConfig();

                for (GroupConfig importGroup : importFormConfig.getGroupConfigList()) {
                    GroupConfigImpl srcGroupConfig = (GroupConfigImpl) importGroup; // expected same implementations
                    GroupConfigImpl newGroupConfig = new GroupConfigImpl();
                    String groupName = srcGroupConfig.getName();

                    newGroupConfig.setName(groupName);
View Full Code Here

Examples of de.odysseus.calyxo.forms.conf.FormConfig

    URL[] inputs = new URL[]{
      getClass().getResource(VALIDATORS),
      getClass().getResource("test2.xml")
    };
    FormsRootConfig config = parser.parse(inputs);
    FormConfig form = config.findFormConfig("LoginForm", null);
    FieldConfig field = form.getFieldConfig("password");
    Iterator matchers = field.getMatchConfigs();

    MatchConfig notEmpty = (MatchConfig)matchers.next();
    assertEquals("notEmpty", notEmpty.getMatcherConfig().getId());
View Full Code Here

Examples of de.odysseus.calyxo.forms.conf.FormConfig

   * Lookup form by name and locale (exact match).
   */
  private FormConfig getFormConfig(String name, Locale locale) {
    FormsConfig formsConfig = (FormsConfig)formsConfigsByLocale.get(locale);
    if (formsConfig != null) {
      FormConfig formConfig = formsConfig.getFormConfig(name);
      if (formConfig != null) {
        return formConfig;
      }
    }
    return null;
View Full Code Here

Examples of de.odysseus.calyxo.forms.conf.FormConfig

  public FormConfig findFormConfig(String name, Locale locale) {
    if (locale == null) {
      locale = defaultLocale;
    }
    do {
      FormConfig result = getFormConfig(name, locale);
      if (result != null)
        return result;
      locale = generalize(locale);
    } while (locale != null);
    return null;
View Full Code Here

Examples of de.odysseus.calyxo.forms.conf.FormConfig

    if (form == null || !locale.equals(form.getLocale())) {
      String name = getFormName(action);
      if (name == null) {
        return null;
      }
      FormConfig formConfig = config.findFormConfig(name, locale);
      if (formConfig == null)
        return null;
      form = factory.createForm(formConfig, locale);
      map.put(action, form);
    }
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.