use of org.akaza.openclinica.bean.submit.EventCRFBean in project OpenClinica by OpenClinica.
the class DataEntryServlet method writeToDB.
protected boolean writeToDB(ItemDataBean itemData, DisplayItemBean dib, ItemDataDAO iddao, int ordinal, HttpServletRequest request) {
ItemDataBean idb = itemData;
UserAccountBean ub = (UserAccountBean) request.getSession().getAttribute(USER_BEAN_NAME);
StudyBean currentStudy = (StudyBean) request.getSession().getAttribute("study");
EventCRFBean ecb = (EventCRFBean) request.getAttribute(INPUT_EVENT_CRF);
idb.setItemId(dib.getItem().getId());
idb.setEventCRFId(ecb.getId());
if (idb.getValue().equals("")) {
idb.setStatus(getBlankItemStatus());
} else {
idb.setStatus(getNonBlankItemStatus(request));
}
if (StringUtils.isBlank(dib.getEditFlag())) {
if (!idb.isActive()) {
// will this need to change for double data entry?
idb.setOrdinal(ordinal);
idb.setCreatedDate(new Date());
idb.setOwner(ub);
idb = (ItemDataBean) iddao.create(idb);
} else {
idb.setUpdater(ub);
// tbh 5990: should we update the logic here for nonrepeats?
// //System.out.println("string util is blank: update an item data " + idb.getId() + " :" + idb.getValue());
LOGGER.debug("update item update_id " + idb.getUpdater().getId());
idb = (ItemDataBean) iddao.updateValue(idb);
}
} else {
// for the items in group, they have editFlag
if ("add".equalsIgnoreCase(dib.getEditFlag())) {
idb.setOrdinal(ordinal);
idb.setCreatedDate(new Date());
idb.setOwner(ub);
LOGGER.debug("create a new item data" + idb.getItemId() + idb.getValue());
// idb = (ItemDataBean) iddao.create(idb);
// >>tbh 08/2008
idb.setUpdater(ub);
// idb = (ItemDataBean) iddao.updateValue(idb);
// instead of two hits to the db, we perform an 'upsert'
// combining them into one
idb = (ItemDataBean) iddao.upsert(idb);
// <<tbh
} else if ("edit".equalsIgnoreCase(dib.getEditFlag())) {
idb.setUpdater(ub);
// //System.out.println("update an item data - running update value " + idb.getId() + " :" + idb.getValue());
LOGGER.debug("update item update_id " + idb.getUpdater().getId());
// to make sure we are running the correct command on the db
if (idb.getId() != 0) {
idb.setUpdatedDate(new Date());
idb = (ItemDataBean) iddao.updateValue(idb);
} else {
idb.setCreatedDate(new Date());
idb.setOrdinal(ordinal);
idb.setOwner(ub);
idb = (ItemDataBean) iddao.upsert(idb);
LOGGER.debug("just ran upsert! " + idb.getId());
}
}
// else if ("remove".equalsIgnoreCase(dib.getEditFlag())) {
// LOGGER.debug("REMOVE an item data" + idb.getItemId() + idb.getValue());
// idb.setUpdater(ub);
// idb.setStatus(Status.DELETED);
// idb = (ItemDataBean) iddao.updateValueForRemoved(idb);
//
// DiscrepancyNoteDAO dnDao = new DiscrepancyNoteDAO(getDataSource());
// List dnNotesOfRemovedItem = dnDao.findExistingNotesForItemData(idb.getId());
// if (!dnNotesOfRemovedItem.isEmpty()) {
// DiscrepancyNoteBean itemParentNote = null;
// for (Object obj : dnNotesOfRemovedItem) {
// if (((DiscrepancyNoteBean) obj).getParentDnId() == 0) {
// itemParentNote = (DiscrepancyNoteBean) obj;
// }
// }
// DiscrepancyNoteBean dnb = new DiscrepancyNoteBean();
// if (itemParentNote != null) {
// dnb.setParentDnId(itemParentNote.getId());
// dnb.setDiscrepancyNoteTypeId(itemParentNote.getDiscrepancyNoteTypeId());
// }
// dnb.setResolutionStatusId(ResolutionStatus.CLOSED.getId());
// dnb.setStudyId(currentStudy.getId());
// dnb.setAssignedUserId(ub.getId());
// dnb.setOwner(ub);
// dnb.setEntityType(DiscrepancyNoteBean.ITEM_DATA);
// dnb.setEntityId(idb.getId());
// dnb.setCreatedDate(new Date());
// dnb.setColumn("value");
// dnb.setDescription("The item has been removed, this Discrepancy Note has been Closed.");
// dnDao.create(dnb);
// dnDao.createMapping(dnb);
// itemParentNote.setResolutionStatusId(ResolutionStatus.CLOSED.getId());
// dnDao.update(itemParentNote);
// }
// }
}
return idb.isActive();
}
use of org.akaza.openclinica.bean.submit.EventCRFBean in project OpenClinica by OpenClinica.
the class DataEntryServlet method createEventCRF.
/**
* Creates a new Event CRF or update the exsiting one, that is, an event CRF can be created but not item data yet, in this case, still consider it is not
* started(called uncompleted before)
* @param request TODO
* @param fp TODO
*
* @return
* @throws Exception
*/
private EventCRFBean createEventCRF(HttpServletRequest request, FormProcessor fp) throws InconsistentStateException {
locale = LocaleResolver.getLocale(request);
// < resmessage =
// ResourceBundle.getBundle("org.akaza.openclinica.i18n.page_messages",
// locale);
// < restext =
// ResourceBundle.getBundle("org.akaza.openclinica.i18n.notes",locale);
// <
// resexception=ResourceBundle.getBundle(
// "org.akaza.openclinica.i18n.exceptions",locale);
UserAccountBean ub = (UserAccountBean) request.getSession().getAttribute(USER_BEAN_NAME);
StudyBean currentStudy = (StudyBean) request.getSession().getAttribute("study");
EventCRFBean ecb;
EventCRFDAO ecdao = new EventCRFDAO(getDataSource());
int crfVersionId = fp.getInt(INPUT_CRF_VERSION_ID);
LOGGER.trace("***FOUND*** crfversionid: " + crfVersionId);
int studyEventId = fp.getInt(INPUT_STUDY_EVENT_ID);
int eventDefinitionCRFId = fp.getInt(INPUT_EVENT_DEFINITION_CRF_ID);
int subjectId = fp.getInt(INPUT_SUBJECT_ID);
int eventCRFId = fp.getInt(INPUT_EVENT_CRF_ID);
LOGGER.trace("look specifically wrt event crf id: " + eventCRFId);
LOGGER.trace("Creating event CRF. Study id: " + currentStudy.getId() + "; CRF Version id: " + crfVersionId + "; Study Event id: " + studyEventId + "; Event Definition CRF id: " + eventDefinitionCRFId + "; Subject: " + subjectId);
StudySubjectDAO ssdao = new StudySubjectDAO(getDataSource());
StudySubjectBean ssb = ssdao.findBySubjectIdAndStudy(subjectId, currentStudy);
if (ssb.getId() <= 0) {
LOGGER.trace("throwing ISE with study subject bean id of " + ssb.getId());
// "begin_data_entry_without_event_but_subject"));
throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("begin_data_entry_without_event_but_subject"));
}
StudyEventDefinitionDAO seddao = new StudyEventDefinitionDAO(getDataSource());
StudyEventDefinitionBean sedb = seddao.findByEventDefinitionCRFId(eventDefinitionCRFId);
// logger.trace("study event definition:" + sedb.getId());
if (sedb.getId() <= 0) {
addPageMessage(resexception.getString("begin_data_entry_without_event_but_study"), request);
throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("begin_data_entry_without_event_but_study"));
}
CRFVersionDAO cvdao = new CRFVersionDAO(getDataSource());
EntityBean eb = cvdao.findByPK(crfVersionId);
if (eb.getId() <= 0) {
//addPageMessage(resexception.getString("begin_data_entry_without_event_but_CRF"));
throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("begin_data_entry_without_event_but_CRF"));
}
StudyEventDAO sedao = new StudyEventDAO(getDataSource());
StudyEventBean sEvent = (StudyEventBean) sedao.findByPK(studyEventId);
StudyBean studyWithSED = currentStudy;
if (currentStudy.getParentStudyId() > 0) {
studyWithSED = new StudyBean();
studyWithSED.setId(currentStudy.getParentStudyId());
}
AuditableEntityBean aeb = sedao.findByPKAndStudy(studyEventId, studyWithSED);
if (aeb.getId() <= 0) {
addPageMessage(resexception.getString("begin_data_entry_without_event_but_especified_event"), request);
throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("begin_data_entry_without_event_but_especified_event"));
}
ecb = new EventCRFBean();
if (eventCRFId == 0) {
// no event CRF created yet
ArrayList ecList = ecdao.findByEventSubjectVersion(sEvent, ssb, (CRFVersionBean) eb);
if (ecList.size() > 0) {
ecb = (EventCRFBean) ecList.get(0);
} else {
ecb.setAnnotations("");
ecb.setCreatedDate(new Date());
ecb.setCRFVersionId(crfVersionId);
if (currentStudy.getStudyParameterConfig().getInterviewerNameDefault().equals("blank")) {
ecb.setInterviewerName("");
} else {
// default will be event's owner name
ecb.setInterviewerName(sEvent.getOwner().getName());
}
if (!currentStudy.getStudyParameterConfig().getInterviewDateDefault().equals("blank")) {
if (sEvent.getDateStarted() != null) {
// default
ecb.setDateInterviewed(sEvent.getDateStarted());
// date
} else {
// logger.trace("evnet start date is null, so date
// interviewed is null");
ecb.setDateInterviewed(null);
}
} else {
ecb.setDateInterviewed(null);
// logger.trace("date interviewed is
// null,getInterviewDateDefault() is blank");
}
// ecb.setOwnerId(ub.getId());
// above depreciated, try without it, tbh
ecb.setOwner(ub);
ecb.setStatus(Status.AVAILABLE);
ecb.setCompletionStatusId(1);
ecb.setStudySubjectId(ssb.getId());
ecb.setStudyEventId(studyEventId);
ecb.setValidateString("");
ecb.setValidatorAnnotations("");
ecb = (EventCRFBean) ecdao.create(ecb);
LOGGER.debug("*********CREATED EVENT CRF");
}
} else {
// there is an event CRF already, only need to update
ecb = (EventCRFBean) ecdao.findByPK(eventCRFId);
ecb.setCRFVersionId(crfVersionId);
ecb.setUpdatedDate(new Date());
ecb.setUpdater(ub);
ecb = updateECB(sEvent, request);
ecb = (EventCRFBean) ecdao.update(ecb);
}
if (ecb.getId() <= 0) {
addPageMessage(resexception.getString("new_event_CRF_not_created"), request);
throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("new_event_CRF_not_created"));
} else {
if (sEvent.getSubjectEventStatus().equals(SubjectEventStatus.SIGNED)) {
sEvent.setSubjectEventStatus(SubjectEventStatus.COMPLETED);
sEvent.setUpdater(ub);
sEvent.setUpdatedDate(new Date());
sedao.update(sEvent);
} else {
sEvent.setSubjectEventStatus(SubjectEventStatus.DATA_ENTRY_STARTED);
sEvent.setUpdater(ub);
sEvent.setUpdatedDate(new Date());
sedao.update(sEvent);
}
}
return ecb;
}
use of org.akaza.openclinica.bean.submit.EventCRFBean in project OpenClinica by OpenClinica.
the class DataEntryServlet method populateNotesWithDBNoteCounts.
/*
* change to explicitly re-set the section bean after reviewing the disc note counts, tbh 01/2010
*/
protected DisplaySectionBean populateNotesWithDBNoteCounts(FormDiscrepancyNotes discNotes, DisplaySectionBean section, HttpServletRequest request) {
DiscrepancyNoteDAO dndao = new DiscrepancyNoteDAO(getDataSource());
// ArrayList items = section.getItems();
EventCRFBean ecb = (EventCRFBean) request.getAttribute(INPUT_EVENT_CRF);
ArrayList<DiscrepancyNoteBean> ecNotes = dndao.findEventCRFDNotesFromEventCRF(ecb);
ArrayList<DiscrepancyNoteBean> existingNameNotes = new ArrayList(), nameNotes = new ArrayList();
ArrayList<DiscrepancyNoteBean> existingIntrvDateNotes = new ArrayList(), dateNotes = new ArrayList();
long t = System.currentTimeMillis();
logMe("Method:populateNotesWithDBNoteCounts" + t);
int intNew = 0, intRes = 0, intUpdated = 0, intClosed = 0, intNA = 0;
int dateNew = 0, dateRes = 0, dateUpdated = 0, dateClosed = 0, dateNA = 0;
boolean hasMoreThreads = false;
for (int i = 0; i < ecNotes.size(); i++) {
DiscrepancyNoteBean dn = ecNotes.get(i);
if (INTERVIEWER_NAME.equalsIgnoreCase(dn.getColumn())) {
discNotes.setNumExistingFieldNotes(INPUT_INTERVIEWER, 1);
request.setAttribute("hasNameNote", "yes");
request.setAttribute(INTERVIEWER_NAME_NOTE, dn);
if (dn.getParentDnId() == 0)
existingNameNotes.add(dn);
}
if (DATE_INTERVIEWED.equalsIgnoreCase(dn.getColumn())) {
discNotes.setNumExistingFieldNotes(INPUT_INTERVIEW_DATE, 1);
request.setAttribute("hasDateNote", "yes");
request.setAttribute(INTERVIEWER_DATE_NOTE, dn);
if (dn.getParentDnId() == 0)
existingIntrvDateNotes.add(dn);
}
}
logMe("Method:populateNotesWithDBNoteCounts before calling setToolTipEventNotes" + System.currentTimeMillis() + "time took:" + (System.currentTimeMillis() - t));
setToolTipEventNotes(request);
request.setAttribute("nameNoteResStatus", getDiscrepancyNoteResolutionStatus(existingNameNotes));
request.setAttribute("IntrvDateNoteResStatus", getDiscrepancyNoteResolutionStatus(existingIntrvDateNotes));
request.setAttribute("existingNameNotes", existingNameNotes);
request.setAttribute("existingIntrvDateNotes", existingIntrvDateNotes);
List<DisplayItemWithGroupBean> allItems = section.getDisplayItemGroups();
LOGGER.debug("start to populate notes: " + section.getDisplayItemGroups().size());
this.output(allItems);
logMe("Looping through allItems time:" + System.currentTimeMillis() + "time took from the begining" + (System.currentTimeMillis() - t));
for (int k = 0; k < allItems.size(); k++) {
DisplayItemWithGroupBean itemWithGroup = allItems.get(k);
if (itemWithGroup.isInGroup()) {
LOGGER.debug("group item DNote...");
List<DisplayItemGroupBean> digbs = itemWithGroup.getItemGroups();
LOGGER.trace("digbs size: " + digbs.size());
for (int i = 0; i < digbs.size(); i++) {
DisplayItemGroupBean displayGroup = digbs.get(i);
List<DisplayItemBean> items = displayGroup.getItems();
for (int j = 0; j < items.size(); j++) {
DisplayItemBean dib = items.get(j);
int itemDataId = dib.getData().getId();
int numNotes = dndao.findNumExistingNotesForItem(itemDataId);
int numNotes1 = dndao.findNumOfActiveExistingNotesForItemData(itemDataId);
int ordinal = this.getManualRows(digbs);
String inputName = getGroupItemInputName(displayGroup, displayGroup.getFormInputOrdinal(), dib);
if (!displayGroup.isAuto()) {
inputName = getGroupItemManualInputName(displayGroup, i, dib);
}
discNotes.setNumExistingFieldNotes(inputName, numNotes1);
ArrayList notes = discNotes.getNotes(inputName);
// + notes2.size());
dib.setNumDiscrepancyNotes(numNotes + notes.size());
dib.setDiscrepancyNoteStatus(getDiscrepancyNoteResolutionStatus(itemDataId, notes));
dib = setTotals(dib, itemDataId, notes, ecb.getId());
LOGGER.debug("dib note size:" + dib.getNumDiscrepancyNotes() + " " + dib.getData().getId() + " " + inputName);
items.set(j, dib);
}
displayGroup.setItems(items);
digbs.set(i, displayGroup);
}
itemWithGroup.setItemGroups(digbs);
} else {
LOGGER.trace("single item db note");
DisplayItemBean dib = itemWithGroup.getSingleItem();
try {
ResponseOptionBean rob = (ResponseOptionBean) dib.getMetadata().getResponseSet().getOptions().get(0);
LOGGER.trace("test print of options for coding: " + rob.getValue());
} catch (NullPointerException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
}
int itemDataId = dib.getData().getId();
int itemId = dib.getItem().getId();
int numNotes = dndao.findNumExistingNotesForItem(itemDataId);
int numNotes1 = dndao.findNumOfActiveExistingNotesForItemData(itemDataId);
String inputFieldName = "input" + itemId;
discNotes.setNumExistingFieldNotes(inputFieldName, numNotes1);
dib.setNumDiscrepancyNotes(numNotes + discNotes.getNotes(inputFieldName).size());
dib.setDiscrepancyNoteStatus(getDiscrepancyNoteResolutionStatus(itemDataId, discNotes.getNotes(inputFieldName)));
dib = setTotals(dib, itemDataId, discNotes.getNotes(inputFieldName), ecb.getId());
ArrayList childItems = dib.getChildren();
for (int j = 0; j < childItems.size(); j++) {
DisplayItemBean child = (DisplayItemBean) childItems.get(j);
int childItemDataId = child.getData().getId();
int childItemId = child.getItem().getId();
int childNumNotes = dndao.findNumExistingNotesForItem(childItemDataId);
String childInputFieldName = "input" + childItemId;
LOGGER.debug("*** setting " + childInputFieldName);
discNotes.setNumExistingFieldNotes(childInputFieldName, childNumNotes);
child.setNumDiscrepancyNotes(childNumNotes + discNotes.getNotes(childInputFieldName).size());
child.setDiscrepancyNoteStatus(getDiscrepancyNoteResolutionStatus(childItemDataId, discNotes.getNotes(childInputFieldName)));
child = setTotals(child, childItemDataId, discNotes.getNotes(childInputFieldName), ecb.getId());
childItems.set(j, child);
}
dib.setChildren(childItems);
itemWithGroup.setSingleItem(runDynamicsItemCheck(dib, null, request));
}
// missing piece of the puzzle - reset the itemgroup into all items?
allItems.set(k, itemWithGroup);
}
section.setDisplayItemGroups(allItems);
return section;
}
use of org.akaza.openclinica.bean.submit.EventCRFBean in project OpenClinica by OpenClinica.
the class DataEntryServlet method isCreateItemReqd.
protected boolean isCreateItemReqd(SectionBean sb, HttpServletRequest request) {
SectionDAO sdao = new SectionDAO(getDataSource());
EventCRFBean ecb = (EventCRFBean) request.getAttribute(INPUT_EVENT_CRF);
EventDefinitionCRFBean edcb = (EventDefinitionCRFBean) request.getAttribute(EVENT_DEF_CRF_BEAN);
DataEntryStage stage = ecb.getStage();
HashMap numItemsHM = sdao.getNumItemsBySectionId();
HashMap numItemsPendingHM = sdao.getNumItemsPendingBySectionId(ecb);
HashMap numItemsCompletedHM = sdao.getNumItemsCompletedBySection(ecb);
HashMap numItemsBlankHM = sdao.getNumItemsBlankBySectionId(ecb);
Integer key = new Integer(sb.getId());
int numItems = TableOfContentsServlet.getIntById(numItemsHM, key);
int numItemsPending = TableOfContentsServlet.getIntById(numItemsPendingHM, key);
int numItemsCompleted = TableOfContentsServlet.getIntById(numItemsCompletedHM, key);
int numItemsBlank = TableOfContentsServlet.getIntById(numItemsBlankHM, key);
LOGGER.debug(" for " + key + " num items " + numItems + " num items blank " + numItemsBlank + " num items pending " + numItemsPending + " completed " + numItemsCompleted);
if (stage.equals(DataEntryStage.INITIAL_DATA_ENTRY) && edcb.isDoubleEntry()) {
if (numItemsPending == 0 && numItems > 0) {
// System.out.println("returns false on ide loop " + key);
return false;
}
} else {
if (numItemsCompleted < numItems) {
return false;
}
}
return true;
}
use of org.akaza.openclinica.bean.submit.EventCRFBean in project OpenClinica by OpenClinica.
the class DataEntryServlet method createItemWithGroups.
//@pgawade 30-May-2012 Fix for issue 13963 - added an extra parameter 'isSubmitted' to method createItemWithGroups
protected List<DisplayItemWithGroupBean> createItemWithGroups(DisplaySectionBean dsb, boolean hasItemGroup, int eventCRFDefId, HttpServletRequest request, boolean isSubmitted) {
HttpSession session = request.getSession();
List<DisplayItemWithGroupBean> displayItemWithGroups = new ArrayList<DisplayItemWithGroupBean>();
EventCRFBean ecb = (EventCRFBean) request.getAttribute(INPUT_EVENT_CRF);
ItemDAO idao = new ItemDAO(getDataSource());
SectionBean sb = (SectionBean) request.getAttribute(SECTION_BEAN);
EventDefinitionCRFBean edcb = (EventDefinitionCRFBean) request.getAttribute(EVENT_DEF_CRF_BEAN);
// BWP>> Get a List<String> of any null values such as NA or NI
// method returns null values as a List<String>
// >>BWP
ArrayList items = dsb.getItems();
// For adding null values to display items
FormBeanUtil formBeanUtil = new FormBeanUtil();
List<String> nullValuesList = formBeanUtil.getNullValuesByEventCRFDefId(eventCRFDefId, getDataSource());
LOGGER.trace("single items size: " + items.size());
for (int i = 0; i < items.size(); i++) {
DisplayItemBean item = (DisplayItemBean) items.get(i);
DisplayItemWithGroupBean newOne = new DisplayItemWithGroupBean();
newOne.setSingleItem(runDynamicsItemCheck(item, null, request));
newOne.setOrdinal(item.getMetadata().getOrdinal());
newOne.setInGroup(false);
newOne.setPageNumberLabel(item.getMetadata().getPageNumberLabel());
displayItemWithGroups.add(newOne);
// logger.trace("just added on line 1979:
// "+newOne.getSingleItem().getData().getValue());
}
if (hasItemGroup) {
ItemDataDAO iddao = new ItemDataDAO(getDataSource(), locale);
ArrayList<ItemDataBean> data = iddao.findAllBySectionIdAndEventCRFId(sb.getId(), ecb.getId());
HashMap<String, ItemDataBean> dataMap = (HashMap<String, ItemDataBean>) getAllActive(data);
if (data != null && data.size() > 0) {
session.setAttribute(HAS_DATA_FLAG, true);
}
LOGGER.trace("found data: " + data.size());
LOGGER.trace("data.toString: " + data.toString());
for (DisplayItemGroupBean itemGroup : dsb.getDisplayFormGroups()) {
LOGGER.debug("found one itemGroup");
DisplayItemWithGroupBean newOne = new DisplayItemWithGroupBean();
// to arrange item groups and other single items, the ordinal of
// a item group will be the ordinal of the first item in this
// group
DisplayItemBean firstItem = itemGroup.getItems().get(0);
// so we are either checking the first or the last item, BUT ONLY ONCE
newOne.setPageNumberLabel(firstItem.getMetadata().getPageNumberLabel());
newOne.setItemGroup(itemGroup);
newOne.setInGroup(true);
newOne.setOrdinal(itemGroup.getGroupMetaBean().getOrdinal());
List<ItemBean> itBeans = idao.findAllItemsByGroupIdOrdered(itemGroup.getItemGroupBean().getId(), sb.getCRFVersionId());
List<DisplayItemBean> dibs = new ArrayList();
boolean hasData = false;
int checkAllColumns = 0;
if (data.size() > 0)
hasData = true;
//@pgawade 30-May-2012 Fix for issue 13963 - added an extra parameter 'isSubmitted' to method buildMatrixForRepeatingGroups
newOne = buildMatrixForRepeatingGroups(newOne, itemGroup, ecb, sb, itBeans, dataMap, nullValuesList, isSubmitted);
if (hasData) {
//TODO: fix the group_has_data flag on bean not on session
session.setAttribute(GROUP_HAS_DATA, Boolean.TRUE);
} else {
session.setAttribute(GROUP_HAS_DATA, Boolean.FALSE);
// no data, still add a blank row for displaying
if (nullValuesList != null && nullValuesList.size() > 0) {
LOGGER.trace("set with nullValuesList of : " + nullValuesList);
}
dibs = FormBeanUtil.getDisplayBeansFromItems(itBeans, getDataSource(), ecb, sb.getId(), nullValuesList, getServletContext());
DisplayItemGroupBean digb2 = new DisplayItemGroupBean();
digb2.setItems(dibs);
digb2.setEditFlag("initial");
}
displayItemWithGroups.add(newOne);
}
}
// if hasItemGroup
Collections.sort(displayItemWithGroups);
return displayItemWithGroups;
}
Aggregations