Hello all,
I have what I hope is a simple question here. I have a Webflow that I am using for some forms in a wizard type scenario and I have a small problem. I discovered it when I was testing one of my JSP files. I would edit the file and copy it to the server, then reload the page. What I noticed was that from the webflow's perspective it was as if I had pushed the submit button again thusly causing a new entry in the DB to be created every time. I has thought my method accounted for a scenario such as this:
but it doesn't. After debugging I see that everything is working as expected, the only strange thing is that the updated object doesn't stay updated in the context. The only thing I can figure is each time the context is being retrieved from some sort of serialization and that the update isn't getting written out. Any information anyone has would be greatly appreciated.Code:@Override public Event persistFormObject(RequestContext context) { setPortletData(context); FieldValue myValue = (FieldValue) context.getFlowScope().get("fValue"); if (myValue.getId() == 0) { myValue = myFieldValueService.addEntity(myValue); } else{ myValue = myFieldValueService.updateEntity(myValue); } return success(); }
Thanks,
Justen


Reply With Quote