我有一个简单的反应形式
public static void readInputFile()
{
//Create a new instance of the array class so that the array can be
//written to without creating a new array for either merge or insert
//sort
Array arr = new Array(1000010);
Element[] array = arr.getarray();
try
{
fileRead = new FileReader(fileLocation);
br = new BufferedReader(new FileReader(fileLocation));
//Allows the first line of the file that includes the titles to
//not be added to the array
String line = br.readLine();
//Counter for iterating through array
int elemCntr = 0;
while (elemCntr != 10)
{
//Variables
String lineline = br.readLine();
//This will split the line into sections based on the
//placement of comas: split data into sections
String[] readLine = lineline.split(",");
firstName = readLine[0];
lastName = readLine[1];
company = readLine[2];
address = readLine[3];
city = readLine[4];
county = readLine[5];
state = readLine[6];
zip = Integer.parseInt(readLine[7]);
phone = readLine[8];
key = Long.parseLong(readLine[9]);
rowNum = arr.numElements + 1;
//Insert data into array
arr.insertvalue(firstName,lastName,company,address,city,state,county,phone,zip,key,rowNum);
}
} catch (Exception e){
// do something
}
}
我正在尝试访问
this.orderForm = this._formBuilder.group({
metadataFormGroup: this._formBuilder.group({
data1: ['',[Validators.pattern(this.nserRegex)]],data2: ['',[Validators.pattern(this.crqRegex)]]
}),infoFormGroup: this._formBuilder.group({
data3: ['',[Validators.pattern(this.blcRegex)]],data4: new FormControl([])
})
});
但这给this.orderForm['metadataFormGroup'].controls['data1'].setvalue('11111111')
请帮助