Solution:
1. Check the JSPX page that the following namespace is available or not. Otherwise add this tag in jsp:root.
xmlns:wf="http://xmlns.oracle.com/bpel/workflow/workflow-taglib.tld"
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:wf="http://xmlns.oracle.com/bpel/workflow/workflow-taglib.tld">
2. Still you have an issue?
Go to "Project Properties" --> "JSP Tag Libraries" --> check "workflow Tags 1.0" available or not.
Otherwise "add" --> "Workflow Tags 1.0" -->"ok"
Thursday, September 18, 2014
Sunday, September 14, 2014
Confirmation Dialog when clicking on REJECT/ CANCEL button in Oracle BPM Human Task and close window
Step1:
Add the below code inside <af:commandToolbarButton>
<af:showPopupBehavior popupId="p1" triggerType="action"/>
Example Code looks like
<af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
text="#{wf:getResourceValue('REJECT', 'bindings.customActions')}"
disabled="#{!bindings.REJECT.enabled}"
action="#{invokeActionBean.invokeOperation}"
partialSubmit="false"
visible="#{wf:isCustomActionAvailable('REJECT', 'bindings.customActions')}"
id="ctb1">
<af:showPopupBehavior popupId="p1" triggerType="action"/>
<f:attribute name="DC_OPERATION_BINDING" value="bindings.REJECT"/>
</af:commandToolbarButton>
Step2:
Add the below code after </af:commandToolbarButton>
<af:popup id="p1">
<af:dialog id="d222" title="Confirmation"
dialogListener="#{CancelBean.isCancelled}">
<af:outputText value="Are you sure that you want to cancel this Request?" id="ot211"/>
</af:dialog>
</af:popup>
Step3:
Add the below code in your cancelandClose() in Bean:
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("REJECT");
Map paramsMap = operationBinding.getParamsMap();
paramsMap.put("DC_OPERATION_BINDING", "bindings.REJECT");
operationBinding.execute();
List errorsOnSubmit = operationBinding.getErrors();
if (errorsOnSubmit == null || errorsOnSubmit.isEmpty()) {
returnMessage = "closeTaskFlow";
FacesContext facesContext = FacesContext.getCurrentInstance();
ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
service.addScript(facesContext, "window.opener = self;window.close();");
}
} catch (Exception e) {
e.printStackTrace();
}
return returnMessage;
}
Add the below code inside <af:commandToolbarButton>
<af:showPopupBehavior popupId="p1" triggerType="action"/>
Example Code looks like
<af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
text="#{wf:getResourceValue('REJECT', 'bindings.customActions')}"
disabled="#{!bindings.REJECT.enabled}"
action="#{invokeActionBean.invokeOperation}"
partialSubmit="false"
visible="#{wf:isCustomActionAvailable('REJECT', 'bindings.customActions')}"
id="ctb1">
<af:showPopupBehavior popupId="p1" triggerType="action"/>
<f:attribute name="DC_OPERATION_BINDING" value="bindings.REJECT"/>
</af:commandToolbarButton>
Step2:
Add the below code after </af:commandToolbarButton>
<af:popup id="p1">
<af:dialog id="d222" title="Confirmation"
dialogListener="#{CancelBean.isCancelled}">
<af:outputText value="Are you sure that you want to cancel this Request?" id="ot211"/>
</af:dialog>
</af:popup>
Step3:
Add the below code in your cancelandClose() in Bean:
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = (OperationBinding)bindings.getOperationBinding("REJECT");
Map paramsMap = operationBinding.getParamsMap();
paramsMap.put("DC_OPERATION_BINDING", "bindings.REJECT");
operationBinding.execute();
List errorsOnSubmit = operationBinding.getErrors();
if (errorsOnSubmit == null || errorsOnSubmit.isEmpty()) {
returnMessage = "closeTaskFlow";
FacesContext facesContext = FacesContext.getCurrentInstance();
ExtendedRenderKitService service = Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
service.addScript(facesContext, "window.opener = self;window.close();");
}
} catch (Exception e) {
e.printStackTrace();
}
return returnMessage;
}
Saturday, September 13, 2014
Subscribe to:
Posts (Atom)