Skip to content

Commit

Permalink
FORGE-1329: Renamed fieldName to named
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Nov 22, 2013
1 parent 8353da6 commit 6da617d
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class NewFieldWizard extends AbstractJavaEECommand implements UIWizard

@Inject
@WithAttributes(label = "Field Name", description = "The field name to be created in the target entity", required = true)
private UIInput<String> fieldName;
private UIInput<String> named;

@Inject
@WithAttributes(label = "Type", description = "The type intended to be used for this field", type = InputType.JAVA_CLASS_PICKER, required = true)
Expand Down Expand Up @@ -140,7 +140,7 @@ public Boolean call() throws Exception
return Date.class.getName().equals(typeValue) || Calendar.class.getName().equals(typeValue);
}
});
builder.add(entity).add(fieldName).add(typeName).add(temporalType).add(length).add(relationshipType).add(lob)
builder.add(entity).add(named).add(typeName).add(temporalType).add(length).add(relationshipType).add(lob)
.add(primitive);
}

Expand Down Expand Up @@ -204,7 +204,7 @@ public String convert(RelationshipType source)
public Result execute(UIExecutionContext context) throws Exception
{
JavaResource javaResource = entity.getValue();
String fieldNameStr = fieldName.getValue();
String fieldNameStr = named.getValue();
Field<JavaClass> field;
JavaClass targetEntity = (JavaClass) javaResource.getJavaSource();
RelationshipType value = relationshipType.getValue();
Expand Down Expand Up @@ -243,7 +243,7 @@ else if (lob.getValue())
facet.saveJavaSource(field.getOrigin());
}
context.getUIContext().setSelection(javaResource);
return Results.success("Field " + fieldName.getValue() + " created");
return Results.success("Field " + named.getValue() + " created");
}
else
{
Expand All @@ -262,9 +262,9 @@ public void validate(UIValidationContext validator)
if (javaResource != null)
{
JavaClass javaClass = (JavaClass) javaResource.getJavaSource();
if (javaClass.hasField(fieldName.getValue()))
if (javaClass.hasField(named.getValue()))
{
validator.addValidationError(entity, "Field '" + fieldName.getValue() + "' already exists");
validator.addValidationError(entity, "Field '" + named.getValue() + "' already exists");
}
}
}
Expand Down Expand Up @@ -310,7 +310,7 @@ else if (val.equals("character"))
public NavigationResult next(UIContext context) throws Exception
{
context.setAttribute(JavaResource.class, entity.getValue());
context.setAttribute("fieldName", fieldName.getValue());
context.setAttribute("fieldName", named.getValue());
context.setAttribute("fieldType", typeName.getValue());
context.setAttribute(RelationshipType.class, relationshipType.getValue());
context.getAttribute(RelationshipType.class);
Expand Down

0 comments on commit 6da617d

Please sign in to comment.