summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-03-14 08:27:32 (EDT)
committer Manik Kishore2012-06-19 07:21:12 (EDT)
commit5adabb29b2a678f663479cf7461f62d947edaa24 (patch)
tree3e8b48a17302fc2dfe4d6c24601845aad035f7e6
parent0b6ba6e8fc1706f08315721b2112d5db3e033786 (diff)
downloadorg.eclipse.stardust.ui.web-5adabb29b2a678f663479cf7461f62d947edaa24.zip
org.eclipse.stardust.ui.web-5adabb29b2a678f663479cf7461f62d947edaa24.tar.gz
org.eclipse.stardust.ui.web-5adabb29b2a678f663479cf7461f62d947edaa24.tar.bz2
Jira-ID: CRNT-24210
1)Moved code to retrieve process description to ViewEventType.POST_OPEN_LIFECYCLE from ViewEventType.CREATED in handleEvent(event) in ProcessInstanceDetailsBean.java and ActivityDetailsBean.java git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@54547 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java16
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java36
2 files changed, 37 insertions, 15 deletions
diff --git a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java
index 9bb3074..4d18eb5 100644
--- a/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java
+++ b/process-portal/src/main/java/org/eclipse/stardust/ui/web/processportal/view/ActivityDetailsBean.java
@@ -363,13 +363,6 @@ public class ActivityDetailsBean
thisView.setIcon(iconPath);
}
- String description = I18nUtils.getDescriptionAsHtml(activityInstance.getActivity(),activityInstance.getActivity().getDescription());
- if (StringUtils.isNotEmpty(description))
- {
- String tooltip = MessagesViewsCommonBean.getInstance().getParamString(
- "views.processInstanceDetailsView.tooltip", thisView.getTooltip(), description);
- thisView.setTooltip(tooltip);
- }
hasCreateCasePermission = AuthorizationUtils.canCreateCase();
hasJoinProcessPermission = AuthorizationUtils.hasAbortAndJoinProcessInstancePermission();
hasSwitchProcessPermission = AuthorizationUtils.hasAbortAndStartProcessInstancePermission();
@@ -441,6 +434,15 @@ public class ActivityDetailsBean
if (isLoadSuccessful())
{
+ String description = I18nUtils.getDescriptionAsHtml(activityInstance.getActivity(), activityInstance
+ .getActivity().getDescription());
+ if (StringUtils.isNotEmpty(description))
+ {
+ String tooltip = MessagesViewsCommonBean.getInstance().getParamString(
+ "views.processInstanceDetailsView.tooltip", thisView.getTooltip(), description);
+ thisView.setTooltip(tooltip);
+ }
+
performAutoOperations(event.getView());
}
}
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java
index a13d3da..b829e3d 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/processContextExplorer/ProcessInstanceDetailsBean.java
@@ -200,14 +200,6 @@ public class ProcessInstanceDetailsBean extends PopupUIComponentBean
pi.getProcessID());
focusView.getViewParams().put("processInstanceName", I18nUtils.getProcessName(processDef));
- String description = I18nUtils.getDescriptionAsHtml(processDef, processDef.getDescription());
- if (StringUtils.isNotEmpty(description))
- {
- String tooltip = MessagesViewsCommonBean.getInstance().getParamString(
- "views.processInstanceDetailsView.tooltip", focusView.getTooltip(), description);
- focusView.setTooltip(tooltip);
- }
-
if (!StringUtils.isEmpty(pOID))
{
try
@@ -224,6 +216,34 @@ public class ProcessInstanceDetailsBean extends PopupUIComponentBean
}
initializePermissions();
}
+ if (ViewEventType.POST_OPEN_LIFECYCLE == event.getType())
+ {
+ View focusView = event.getView();
+ if (focusView != null && processInstance != null)
+ {
+ setProcessDescription(processInstance, focusView);
+ }
+ }
+ }
+
+ /**
+ *
+ * @param processInstance
+ * @param focusView
+ * @return
+ */
+ private void setProcessDescription(ProcessInstance processInstance, View focusView)
+ {
+ String tooltip = null;
+ ProcessDefinition processDef = ProcessDefinitionUtils.getProcessDefinition(processInstance.getModelOID(),
+ processInstance.getProcessID());
+ String description = I18nUtils.getDescriptionAsHtml(processDef, processDef.getDescription());
+ if (StringUtils.isNotEmpty(description))
+ {
+ tooltip = MessagesViewsCommonBean.getInstance().getParamString("views.processInstanceDetailsView.tooltip",
+ focusView.getTooltip(), description);
+ focusView.setTooltip(tooltip);
+ }
}
private void initializePermissions()