Highlighted
Absent Member.. Absent Member..
Absent Member..
429 views

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.");
}

 

0 Likes
1 Reply
Highlighted
Super Contributor.
Super Contributor.

Re: mb.ok causes logout on ESS in Service Catalog

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;
}

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.