private static Logger log = Logger.getLogger(LoadAction.class);
@Override
public EditPanel createPanel(ActionMessages errors, LoadForm form, Hashtable<String, Object> attributes, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
ListConfigurationVO listConfiguration = (ListConfigurationVO)attributes.get("listConfiguration");
String name = "list";
if(log.isDebugEnabled())
log.debug("listConfiguration (in panel): "+listConfiguration);
EditPanel panel = null;
if(listConfiguration.getUser() == null) {
panel = new EditPanel(Right.ADMINISTRATION_LIST_GLOBALLIST, listConfiguration);
} else {
panel = new EditPanel(Right.ADMINISTRATION_LIST_WRITE, listConfiguration);
}
if(listConfiguration.getId() == null)
panel.setTitle(MessageUtil.message(request, "module.system.list.create.title"));
else {
panel.setTitle(MessageUtil.message(request, "module.system.list.edit.title", listConfiguration.getName()));
panel.setAttribute(DeleteAction.TEXT_TITLE, MessageUtil.message(request, "module.system.list.delete.title", listConfiguration.getName()));
panel.setAttribute(DeleteAction.TEXT_QUESTION, MessageUtil.message(request, "module.system.list.delete.question", listConfiguration.getName()));
}
panel.addAction(Action.Type.DELETE, "/system/settings/"+name+"/delete");
panel.addAction(Action.Type.SAVE, "/system/settings/"+name+"/save");