Subversion Repositories eFlore/Applications.coel

Rev

Rev 1239 | Rev 1329 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1239 Rev 1246
Line 107... Line 107...
107
		projetsCombo.setTabIndex(tabIndex++);
107
		projetsCombo.setTabIndex(tabIndex++);
108
		projetsCombo.setFieldLabel(i18nC.projetChamp());
108
		projetsCombo.setFieldLabel(i18nC.projetChamp());
109
		projetsCombo.setDisplayField("nom");
109
		projetsCombo.setDisplayField("nom");
110
		projetsCombo.setForceSelection(true);
110
		projetsCombo.setForceSelection(true);
111
		projetsCombo.setValidator(new Validator() {
111
		projetsCombo.setValidator(new Validator() {
112
			@Override
-
 
113
			public String validate(Field<?> field, String value) {
112
			public String validate(Field<?> field, String value) {
114
				String retour = null;
113
				String retour = null;
115
				if (field.getRawValue().equals("")) {
114
				if (field.getRawValue().equals("")) {
116
					field.setValue(null);
115
					field.setValue(null);
117
				} else if (projetsCombo.getStore().findModel("nom", field.getRawValue()) == null) {
116
				} else if (projetsCombo.getStore().findModel("nom", field.getRawValue()) == null) {
Line 134... Line 133...
134
		structuresCombo.setTabIndex(tabIndex++);
133
		structuresCombo.setTabIndex(tabIndex++);
135
		structuresCombo.setFieldLabel(i18nC.lienStructureCollection());
134
		structuresCombo.setFieldLabel(i18nC.lienStructureCollection());
136
		structuresCombo.setDisplayField("nom");
135
		structuresCombo.setDisplayField("nom");
137
		structuresCombo.setForceSelection(true);
136
		structuresCombo.setForceSelection(true);
138
		structuresCombo.setValidator(new Validator() {
137
		structuresCombo.setValidator(new Validator() {
139
			@Override
-
 
140
			public String validate(Field<?> field, String value) {
138
			public String validate(Field<?> field, String value) {
141
				String retour = null;
139
				String retour = null;
142
				if (field.getRawValue().equals("")) {
140
				if (field.getRawValue().equals("")) {
143
					field.setValue(null);
141
					field.setValue(null);
144
				} else if (structuresCombo.getStore().findModel("nom", field.getRawValue()) == null) {
142
				} else if (structuresCombo.getStore().findModel("nom", field.getRawValue()) == null) {
Line 159... Line 157...
159
		collectionsCombo.setTabIndex(tabIndex++);
157
		collectionsCombo.setTabIndex(tabIndex++);
160
		collectionsCombo.setFieldLabel(i18nC.lienMereCollection());
158
		collectionsCombo.setFieldLabel(i18nC.lienMereCollection());
161
		collectionsCombo.setDisplayField("nom");
159
		collectionsCombo.setDisplayField("nom");
162
		collectionsCombo.setForceSelection(true);
160
		collectionsCombo.setForceSelection(true);
163
		collectionsCombo.setValidator(new Validator() {
161
		collectionsCombo.setValidator(new Validator() {
164
			@Override
-
 
165
			public String validate(Field<?> field, String value) {
162
			public String validate(Field<?> field, String value) {
166
				String retour = null;
163
				String retour = null;
167
				if (field.getRawValue().equals("")) {
164
				if (field.getRawValue().equals("")) {
168
					field.setValue(null);
165
					field.setValue(null);
169
				} else if (collectionsCombo.getStore().findModel("nom", field.getRawValue()) == null) {
166
				} else if (collectionsCombo.getStore().findModel("nom", field.getRawValue()) == null) {