viewState = (viewState == null) ? RenderUtils.getViewState("materialTypeToCreate") : viewState;
if(viewState != null) { MaterialTypeBean materialTypeBean = (MaterialTypeBean) viewState.getMetaObject().getObject(); if(materialTypeBean.getMaterial() == null) { addActionMessage(request, "error.material.not.found"); } } viewState = (viewState == null) ? RenderUtils.getViewState("materialTypeToCreate") : viewState;
    public ActionForward prepareInsertMaterialOccupation(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixFilterException,            FenixServiceException, ExcepcaoPersistencia {                       IViewState viewState = RenderUtils.getViewState("materialTypeWithMaterial");        viewState = (viewState == null) ? RenderUtils.getViewState("materialTypeToCreate") : viewState;        return setMaterialTypeBean(mapping, request, viewState);    }       