mb.ok causes logout on ESS in Service Catalog

Greetings All,

 

We have a particularly annoying issue.

Background:

Our Service Catalog environment has had to be tailored to address a few shortcomings. One of which is adding an empty bundle to your cart (i.e. user does not select any option but still clicks 'Add' to the cart). We sorted out the way to prevent them from doing this. Part of the requirement is to alert the user so that she unequivocally knows that an error has been made. We used RAD app 'mb.ok' for the alert and it works surprisingly well... unless you are logged into ESS.


To overcome this we have resorted to a simple print statement in JS (where $G.ess=true). Effective, but not consistent from UI perspective.

 

Any ideas?

 

TIA

 

Display Option: svcCat.display.item_additem_201 & svcCat.edit.item_save_201

Code:

//print("optionsAlias: "   vars.$L_file.optionsAlias);
vars.$dsaction=null;
if (vars.$L_file.type.toLowerCase() == "bundle")
{
	var canAddToCart = false;
	canAddToCart = lib.MTLSvcCart.isBundleItemSelected(vars.$L_file.optionsAlias);
	//print("canAddToCart: "   canAddToCart);
	if (!canAddToCart)
	{
		vars.$dsaction="do nothing";
		vars.$theMessage="You must select at least 1 item from the bundle before adding the bundle to your cart!";
		if (vars.$G_ess)
		{
			print(vars.$theMessage);
		}
		else
		{
			lib.mtlJSMessageBox.displayMessageBox(vars.$theMessage, 3);
		}
	}
	else
	{
		vars.$dsaction="additem";
		//print(vars.$L_file.type   ": "   vars.$L_file.displayName   " added to cart.");
	}
}
else
{
	vars.$dsaction="additem";
	//print(vars.$L_file.type   ": "   vars.$L_file.displayName   " added to cart.");
}

 

  • add || system.functions.nullsub(vars.$G_ess, false)) to f(vars.$G_bg || vars.$L_bg)
    in domessageBox function

    //if we are in a background process...just print the message
    //QCCR1E75763 Search knowledgebase in ess.do will logout directly, if delete search server
    //we are in the ESS client...just also print the message
    //add by Neilyu since 06/13/2012
    if(vars.$G_bg || vars.$L_bg || system.functions.nullsub(vars.$G_ess, false))
    {
    print("KMUtils domessageBox print msg: " message);
    return;
    }