private void addCommentsToResult(DynamicGridRow row, ResultComponentCommentsVoCollection resultComments) { if (resultComments == null) return; for (int i = 0 ; i < resultComments.size() ; i++) { DynamicGridRow newRow = row.getRows().newRow(); DynamicGridColumn colTest = grid.getColumns().getByIdentifier(ResultDisplayHelper.COL_TEST); DynamicGridCell cell = newRow.getCells().newCell(colTest,DynamicCellType.WRAPTEXT); cell.setReadOnly(true);//WDEV-16232 cell.setValue(resultComments.get(i).getCmtText()); colTest.setCanGrow(true); colTest.setDynamicWidthSupported(true); cell.setWidth(700); } }
private String getResultComments(ResultComponentCommentsVoCollection comments) { if(comments == null) return ""; StringBuffer result = new StringBuffer(); for(int x = 0; x < comments.size(); x++) { if(comments.get(x) != null && comments.get(x).getCmtTextIsNotNull()) { if(result.length() > 0) result.append("\n"); result.append(comments.get(x).getCmtText()); } } return result.toString(); }