|
|
How to process more form fields?
Hi.
I have more than 1000 fields in the quot;update formquot;.I did the following code for updating all fields. I don't know it is the right way. please help me to code the right way.
Controller:
if(request.getParameter(quot;updatedquot;)!=null){
for (String envName : env.keySet()) {
$counter=$counter+1; if (request.getParameter(envName) !=null){ Code code = codeDao.findCode(envName); ScheduleId scheduleId = new ScheduleId(); scheduleId.setCode(code.getCode()); scheduleId.setCompanyId(company.getCompanyId()); scheduleId.setProviderId(provider.getProviderId()) ; FeeSchedule feeSchedule = feeScheduleDao.findFeeSchedule(scheduleId); Double codeprice=Double.parseDouble(request.getParameter( envName)); if(codeprice!=0){ if(feeSchedule!=null){ feeSchedule.setPrice(codeprice); feeScheduleDao.addEditFeeSchedule(feeSchedule); } } }
}
}
}
Hello
use code tags for the code, is more readable for us
I have more than 1000 fields in the quot;update formquot;
1000 fields for a form? or did you mean 1000 rows
Please expand your idea and give us more code to get a better understanding, 1000 is a huge number, what are you trying to do?
Yeah, i have 1000 rows, In table i have many columns but i need to edit one column each row.
Hello
Yeah, i have 1000 rows, In table i have many columns but i need to edit one column each row.
OK
1) use pagination, avoid to load the 1000 rows in the same time to send them all to the view, it is expensive
2) for each row in your report you can add a link to a editable page or form to make your requirement
HTH |
|