summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-04-11 01:56:44 (EDT)
committerManik Kishore2012-06-19 07:26:28 (EDT)
commitf2823f3903fc4f02f39ff2ae899fd846a1185353 (patch)
tree468a9b10bc028dcf4b195a0f25904adf76306b55
parent083226ff1ea67a176a39b4639634fa521b6e4809 (diff)
downloadorg.eclipse.stardust.ui.web-f2823f3903fc4f02f39ff2ae899fd846a1185353.zip
org.eclipse.stardust.ui.web-f2823f3903fc4f02f39ff2ae899fd846a1185353.tar.gz
org.eclipse.stardust.ui.web-f2823f3903fc4f02f39ff2ae899fd846a1185353.tar.bz2
Jira-ID: CRNT-24389
1)Made ProcessDiagramBean extends UIComponentBean implement ViewEventHandler 2)Added controller attribute in businessControlCenterUi-context.xml for processDiagramView 3)Moved code to read focusView and populate processInstanceOID to handleEvent() git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@55406 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessDiagramBean.java28
-rw-r--r--business-control-center/src/main/resources/META-INF/spring/businessControlCenterUi-context.xml2
2 files changed, 19 insertions, 11 deletions
diff --git a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessDiagramBean.java b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessDiagramBean.java
index fc43520..b629e96 100644
--- a/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessDiagramBean.java
+++ b/business-control-center/src/main/java/org/eclipse/stardust/ui/web/bcc/views/ProcessDiagramBean.java
@@ -33,9 +33,11 @@ import org.eclipse.stardust.ui.web.bcc.ResourcePaths;
import org.eclipse.stardust.ui.web.bcc.WorkflowFacade;
import org.eclipse.stardust.ui.web.bcc.jsf.BusinessControlCenterConstants;
import org.eclipse.stardust.ui.web.bcc.jsf.InvalidServiceException;
-import org.eclipse.stardust.ui.web.common.PopupUIComponentBean;
-import org.eclipse.stardust.ui.web.common.app.PortalApplication;
+import org.eclipse.stardust.ui.web.common.UIComponentBean;
import org.eclipse.stardust.ui.web.common.app.View;
+import org.eclipse.stardust.ui.web.common.event.ViewEvent;
+import org.eclipse.stardust.ui.web.common.event.ViewEvent.ViewEventType;
+import org.eclipse.stardust.ui.web.common.event.ViewEventHandler;
import org.eclipse.stardust.ui.web.viewscommon.beans.SessionContext;
import org.eclipse.stardust.ui.web.viewscommon.utils.UserUtils;
@@ -43,7 +45,7 @@ import org.eclipse.stardust.ui.web.viewscommon.utils.UserUtils;
* @author Ankita.Patel
* @version $Revision: $
*/
-public class ProcessDiagramBean extends PopupUIComponentBean implements ResourcePaths
+public class ProcessDiagramBean extends UIComponentBean implements ResourcePaths, ViewEventHandler
{
private static final long serialVersionUID = -5438797603265752843L;
@@ -74,14 +76,20 @@ public class ProcessDiagramBean extends PopupUIComponentBean implements Resource
{
super(V_processDiagramView);
sessionCtx = SessionContext.findSessionContext();
-
- View focusView = PortalApplication.getInstance().getFocusView();
- String pOID = focusView.getParamValue("processInstanceOId");
- if (!StringUtils.isEmpty(pOID))
- processInstanceOID = Long.parseLong(pOID);
- initialize();
}
-
+
+ public void handleEvent(ViewEvent event)
+ {
+ if (ViewEventType.CREATED == event.getType())
+ {
+ View focusView = event.getView();
+ String pOID = focusView.getParamValue("processInstanceOId");
+ if (!StringUtils.isEmpty(pOID))
+ processInstanceOID = Long.parseLong(pOID);
+ initialize();
+ }
+ }
+
@Override
public void initialize()
{
diff --git a/business-control-center/src/main/resources/META-INF/spring/businessControlCenterUi-context.xml b/business-control-center/src/main/resources/META-INF/spring/businessControlCenterUi-context.xml
index ab0e98f..4f7e562 100644
--- a/business-control-center/src/main/resources/META-INF/spring/businessControlCenterUi-context.xml
+++ b/business-control-center/src/main/resources/META-INF/spring/businessControlCenterUi-context.xml
@@ -129,6 +129,6 @@ http://infinity.com/bpm/portal/common/uiDefinition http://infinity.com/bpm/porta
</ippui:view>
<ippui:view name="costs" include="/plugins/business-control-center/views/costs.xhtml" controller="costsBean"> <ippui:preferences> <ippui:preferencePage name="icon" include="/plugins/views-common/images/icons/money-coin.png" /> </ippui:preferences> </ippui:view>
- <ippui:view name="activityCriticalityManagerView" include="/plugins/business-control-center/views/activityCriticalityManagerView.xhtml" controller="activityCriticalityManagerBean" > <ippui:preferences> <ippui:preferencePage name="icon" include="/plugins/views-common/images/icons/criticality_manager.png" /> </ippui:preferences> </ippui:view> <ippui:view name="ganttChartView" include="/plugins/business-control-center/views/ganttChartView.xhtml" controller="ganttChartSelectionBean" identityParams="processInstanceOId"> <ippui:preferences> <ippui:preferencePage name="configuration" include="/plugins/business-control-center/views/ganttChartConfigurationDialog.xhtml" /> </ippui:preferences> </ippui:view> <ippui:view name="processDiagramView" identityParams="processInstanceOId" include="/plugins/business-control-center/views/processDiagramView.xhtml" />
+ <ippui:view name="activityCriticalityManagerView" include="/plugins/business-control-center/views/activityCriticalityManagerView.xhtml" controller="activityCriticalityManagerBean" > <ippui:preferences> <ippui:preferencePage name="icon" include="/plugins/views-common/images/icons/criticality_manager.png" /> </ippui:preferences> </ippui:view> <ippui:view name="ganttChartView" include="/plugins/business-control-center/views/ganttChartView.xhtml" controller="ganttChartSelectionBean" identityParams="processInstanceOId"> <ippui:preferences> <ippui:preferencePage name="configuration" include="/plugins/business-control-center/views/ganttChartConfigurationDialog.xhtml" /> </ippui:preferences> </ippui:view> <ippui:view name="processDiagramView" include="/plugins/business-control-center/views/processDiagramView.xhtml" controller="ippBCCDiagramBean" identityParams="processInstanceOId" />
</ippui:perspective>
</beans> \ No newline at end of file