@Override
protected ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
throws Exception
{
DecoratorDynamicNestedPropertiesDefinition object = (DecoratorDynamicNestedPropertiesDefinition)command;
String shortName = object.getShortName();
String renderingparent = request.getParameter("renderingparent");
if(renderingparent!=null && !renderingparent.isEmpty()) {
DecoratorDynamicTypeNested rPd = getApplicationService().get(DecoratorDynamicTypeNested.class, Integer.parseInt(renderingparent));
if(!shortName.startsWith(rPd.getShortName())) {
object.getReal().setShortName(rPd.getShortName() + shortName);
}
}
return super.onSubmit(request, response, command, errors);
}