private ResultPatent readPatentFromRequest(HttpServletRequest request) throws Exception { final String patentIdStr; if(request.getParameterMap().containsKey("oid")) { patentIdStr = request.getParameter("oid"); } else {   patentIdStr = request.getParameterMap().containsKey("resultId") ? request.getParameter("resultId") : (String) request.getAttribute("resultId"); }  final ResultPatent patent = (ResultPatent) rootDomainObject.readResultByOID(Integer.valueOf(patentIdStr));
private ResultPatent readPatentFromRequest(HttpServletRequest request) { ResultPatent patent = (ResultPatent) readResultFromRequest(request);  if (patent==null) { try { patent = (ResultPatent) RenderUtils.getViewState().getMetaObject().getObject(); } catch (Exception e) {} }
    private ResultPatent readPatentFromRequest(HttpServletRequest request) throws Exception {        final String patentIdStr;        if(request.getParameterMap().containsKey("oid")) {            patentIdStr = request.getParameter("oid");        }        else {            //If we get here from Result Participation Management, id comes in an attribute            //If we get here from Patents Management, id comes in a paremeter            patentIdStr = request.getParameterMap().containsKey("resultId") ?                    request.getParameter("resultId") : (String) request.getAttribute("resultId");        }                        final ResultPatent patent = (ResultPatent) rootDomainObject.readResultByOID(Integer.valueOf(patentIdStr));        if (patent == null) {            addActionMessage(request,"researcher.result.error.resultNotFound");        }        else {            request.setAttribute("patent", patent);            }                return patent;    }