private void setModelCodesToView(boolean value) {
   if (currentDetails.getCodeLists() != null) {
     Collections.sort(currentDetails.getCodeLists(), new GroupedCodeListDTO.Comparator());
     addCodeListDisplay.setCodeListName(currentDetails.getName());
     currentCodeLists = new ManageGroupCodeListsModel(currentDetails.getCodeLists(), value);
     currentCodeLists.setPageSize(addCodeListDisplay.getPageSize());
     addCodeListDisplay.buildDataTable(
         currentCodeLists,
         value,
         currentDetails.getTotalCodeList(),
         currentDetails.getCodeListsPageCount(),
         addCodeListDisplay.getCurrentPage());
   }
   ManageGroupedCodeListsSummaryModel codeListsSummaryModel =
       new ManageGroupedCodeListsSummaryModel();
   codeListsSummaryModel.setData(currentDetails.getCodeLists());
   detailDisplay.setCodeLists(
       codeListsSummaryModel,
       currentDetails.getCodeListsPageCount(),
       currentDetails.getTotalCodeList(),
       detailDisplay.getCodeListsSummaryWidget().getCurrentPage());
   if (!isNewCodeList) {
     if (currentDetails.isDraft())
       ReadOnlyHelper.setReadOnlyForCurrentMeasure(
           addCodeListDisplay.asWidget(), currentDetails.isMyValueSet());
     else ReadOnlyHelper.setReadOnlyForCurrentMeasure(addCodeListDisplay.asWidget(), false);
   } else {
     ReadOnlyHelper.setReadOnlyForCurrentMeasure(addCodeListDisplay.asWidget(), isNewCodeList);
   }
 }