Hi
I have an application, in which 2 BigDecimal values are compared , and if they don't match, an error is to be displayed.
I am able to compare the values. But the message is not shown even when the condition is not met.
Code is as follows:
BigDecimal actualLiftingsTotal=wdContext.nodeContractVolumeResultViewNode().nodeOutput().nodeLi_Con_Nom().getLi_Con_NomElementAt(size-1).getAct_Lift();
BigDecimal contractVolumeTotal=wdContext.nodeContractVolumeResultViewNode().nodeOutput().nodeLi_Con_Nom().getLi_Con_NomElementAt(size-1).getCon_Vol();
BigDecimal Actual_Proposed_Total=actualLiftingsTotal.add(bdProp_Nom_Value);
try
{
if(Actual_Proposed_Total==contractVolumeTotal)
{
int flag2=1;
}
else
{
IWDMessageManager msgMgr = this.wdThis.wdGetAPI().getComponent().getMessageManager();
IWDAttributeInfo attributeInfo=this.wdContext.getNodeInfo().getChild("ContractsVolumeResultViewNode").getChild("Output").getChild("Li_Con_Nom_output").getAttribute("Prop_Nom");
msgMgr.reportContextAttributeMessage(this.wdContext.currentContractVolumeResultViewNodeElement(),attributeInfo,IMessageContractVolumesComp.CHECK__PROPOSEDNOMINATION,new Object[] {Actual_Proposed_Total},true);
}
}catch(NullPointerException ex)
{
ex.printStackTrace();
}
This is being done on the Save Action Button.
Can anybody please help.
Thanks & regards,
Anupreet