int mboxid = -1;
if (msgs.isEmpty() && StringUtils.isEmpty(mbox.getName()))
msgs.add("name", new ActionMessage("error.mbox.name_empty"));
else if (msgs.isEmpty()) {
SiteBean site = super.getSiteBean(request);
MusicBoxBean mbean = new MusicBoxBean();
mbean.setName(super.autoFiltrate(site, mbox.getName()));
if (StringUtils.isNotEmpty(mbox.getDesc())){
String desc = super.autoFiltrate(site, mbox.getDesc());
mbean.setDesc(super.filterScriptAndStyle(desc));
}
mbean.setCreateTime(new Date());
mbean.setSite(site);
MusicDAO.createBox(mbean, mbox.getId(), mbox.getDirection() == 1);
mboxid = mbean.getId();
}
if (!msgs.isEmpty()) {
saveMessages(request, msgs);
return mapping.findForward("mbox_add");
}