if (hasActionErrors()) {
return INPUT;
}
LogInformation logInfo;
PageCollection pCol;
if (getPCol().getId() == null || "".equalsIgnoreCase(getPCol().getId())) {
logInfo = new LogInformation();
pCol = new PageCollection();
logInfo.setCreateBy(sess.getCurrentUser().getId());
logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
} else {
pCol = (PageCollection) getManager().getById(PageCollection.class,
getPCol().getId());
logInfo = pCol.getLogInformation();
}
logInfo.setLastUpdateBy(sess.getCurrentUser().getId());
logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
logInfo.setActiveFlag(getActive());
pCol.setName(getPCol().getName());
pCol.setDescription(getPCol().getDescription());
pCol.setLogInformation(logInfo);
getManager().save(pCol);
setPCol(pCol);
return SUCCESS;
}