Fixed tabs to spaces; it is evil that eclipse comes with this sort of default...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@628703 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David E. Jones
2008-02-18 12:34:08 +00:00
parent d7a13bb823
commit 80acfcb716
4 changed files with 189 additions and 189 deletions
@@ -69,7 +69,7 @@ public class ModelForm extends ModelWidget {
public static final String module = ModelForm.class.getName();
public static final String DEFAULT_FORM_RESULT_LIST_NAME = "defaultFormResultList";
protected ModelReader entityModelReader;
protected ModelReader entityModelReader;
protected DispatchContext dispatchContext;
protected String formLocation;
@@ -609,24 +609,24 @@ public class ModelForm extends ModelWidget {
if (modelParam.formDisplay) {
if (UtilValidate.isNotEmpty(modelParam.entityName) && UtilValidate.isNotEmpty(modelParam.fieldName)) {
ModelEntity modelEntity;
try {
modelEntity = this.entityModelReader.getModelEntity(modelParam.entityName);
if (modelEntity != null) {
ModelField modelField = modelEntity.getField(modelParam.fieldName);
if (modelField != null) {
// okay, populate using the entity field info...
ModelFormField modelFormField = this.addFieldFromEntityField(modelEntity, modelField, autoFieldsService.defaultFieldType, autoFieldsService.defaultPosition);
if (UtilValidate.isNotEmpty(autoFieldsService.mapName)) {
modelFormField.setMapName(autoFieldsService.mapName);
}
modelFormField.setRequiredField(!modelParam.optional);
// continue to skip creating based on service param
continue;
}
}
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
try {
modelEntity = this.entityModelReader.getModelEntity(modelParam.entityName);
if (modelEntity != null) {
ModelField modelField = modelEntity.getField(modelParam.fieldName);
if (modelField != null) {
// okay, populate using the entity field info...
ModelFormField modelFormField = this.addFieldFromEntityField(modelEntity, modelField, autoFieldsService.defaultFieldType, autoFieldsService.defaultPosition);
if (UtilValidate.isNotEmpty(autoFieldsService.mapName)) {
modelFormField.setMapName(autoFieldsService.mapName);
}
modelFormField.setRequiredField(!modelParam.optional);
// continue to skip creating based on service param
continue;
}
}
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
}
ModelFormField modelFormField = this.addFieldFromServiceParam(modelService, modelParam, autoFieldsService.defaultFieldType, autoFieldsService.defaultPosition);
@@ -654,11 +654,11 @@ public class ModelForm extends ModelWidget {
autoFieldsEntities.add(autoFieldsEntity);
// read entity def and auto-create fields
ModelEntity modelEntity = null;
try {
modelEntity = this.entityModelReader.getModelEntity(autoFieldsEntity.entityName);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
try {
modelEntity = this.entityModelReader.getModelEntity(autoFieldsEntity.entityName);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
if (modelEntity == null) {
throw new IllegalArgumentException("Error finding Entity with name " + autoFieldsEntity.entityName + " for auto-fields-entity in a form widget");
}