YfsGetImageOptions

Description

This JSP function builds an image tag in HTML. The image may be hidden, based on whether the modification of the XML attribute passed as a parameter is permitted or not, unlike the getImageOptions() function.

A Java™ constants file keeps the image path and icon centralized. If the path starts with /smcfs/console/icons, the image file is first searched for inside /extensions/global/webpages/icons/yantraiconsbe.jar (or the localized icons JAR file) and then inside the /webpages/yfscommon/yantraiconsbe.jar (or the localized icons JAR file). The path to be specified is the path of the image file inside the JAR file.

If the path does not start with /smcfs/console/icons, it picks up the file from the location in the EAR file. It is strongly advised that you place your images under /console/icons in the custom icons JAR file (yantraiconsbe.jar).

The path to be specified is the path of the image file inside the JAR file.

Syntax

String yfsGetImageOptions(String src, String alt, String name, String allowModBinding)

Parameters

src - Required. Image file name, including the path, within the icons JAR file.

alt - Required. Tooltip to use for the image.

name - Required. Path in the target XML attribute. This function shows the image only when modification of this attribute is permitted based on the status of the current entity.

allowModBinding - Required. Binding string that points to a set of elements containing modification types that are permitted for the current order status.

JSP usage

<img class="lookupicon" name="search" onclick="invokeCalendar(this); 
return false"  
<%=yfsGetImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON, "Calendar", 
"xml:/Order/@ReqShipDate", "xml:/Order/AllowedModifications")%>/>