summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-03-07 05:15:11 (EST)
committer Manik Kishore2012-06-19 07:19:33 (EDT)
commit5056f4ebcf841a786c67d1291d2fbfdc5fb11b0b (patch)
treeb6a61f94e31c6cdb308bd5d0e78aa996204e8595
parentfc68a962b655531be6521d15b336c8cf30b27c81 (diff)
downloadorg.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.java16
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 += " ...";
+ }
}
}