| author | Sidharth Singh | 2012-03-07 05:15:11 (EST) |
|---|---|---|
| committer | Manik Kishore | 2012-06-19 07:19:33 (EDT) |
| commit | 5056f4ebcf841a786c67d1291d2fbfdc5fb11b0b (patch) (side-by-side diff) | |
| tree | b6a61f94e31c6cdb308bd5d0e78aa996204e8595 | |
| parent | fc68a962b655531be6521d15b336c8cf30b27c81 (diff) | |
| download | org.eclipse.stardust.ui.web-5056f4ebcf841a786c67d1291d2fbfdc5fb11b0b.zip org.eclipse.stardust.ui.web-5056f4ebcf841a786c67d1291d2fbfdc5fb11b0b.tar.gz org.eclipse.stardust.ui.web-5056f4ebcf841a786c67d1291d2fbfdc5fb11b0b.tar.bz2 | |
Jira-ID: CRNT-24080
1)Added code to handle no link comments while creating NotesInfo in ProcessInstanceTableEntry.java
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@54357 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
| -rw-r--r-- | views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/helper/processTable/ProcessInstanceTableEntry.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/helper/processTable/ProcessInstanceTableEntry.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/helper/processTable/ProcessInstanceTableEntry.java index 3ecd7a1..2200e15 100644 --- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/helper/processTable/ProcessInstanceTableEntry.java +++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/helper/processTable/ProcessInstanceTableEntry.java @@ -17,6 +17,7 @@ import java.util.Map; import org.eclipse.stardust.common.CollectionUtils;
import org.eclipse.stardust.common.DateUtils;
+import org.eclipse.stardust.common.StringUtils;
import org.eclipse.stardust.engine.api.dto.Note;
import org.eclipse.stardust.engine.api.dto.ProcessInstanceDetails;
import org.eclipse.stardust.engine.api.model.ProcessDefinition;
@@ -179,14 +180,17 @@ public class ProcessInstanceTableEntry extends DefaultRowModel linkType = getLinkType(processInstanceLink, processInstance);
// NotesInfo populated to display the LinkComment
- this.noteInfo = new NoteInfo(processInstanceLink.getComment(), UserUtils.getUserDisplayLabel(processInstance.getStartingUser()),
- DateUtils.formatDateTime(processInstanceLink.getCreateTime()), linkType);
+ this.noteInfo = new NoteInfo(processInstanceLink.getComment(), UserUtils.getUserDisplayLabel(processInstance
+ .getStartingUser()), DateUtils.formatDateTime(processInstanceLink.getCreateTime()), linkType);
- this.notePreview = processInstanceLink.getComment().substring(0,
- Math.min(processInstanceLink.getComment().length(), TEXT_PREVIEW_LENGTH));
- if (notePreview.length() < processInstanceLink.getComment().length())
+ if (StringUtils.isNotEmpty(processInstanceLink.getComment()))
{
- notePreview += " ...";
+ this.notePreview = processInstanceLink.getComment().substring(0,
+ Math.min(processInstanceLink.getComment().length(), TEXT_PREVIEW_LENGTH));
+ if (notePreview.length() < processInstanceLink.getComment().length())
+ {
+ notePreview += " ...";
+ }
}
}
|

