GetDetailHrefOptions (with additional parameter)

Description

This JSP function is similar to the getDetailHrefOptions() function, except that it takes an additional parameter. This additional parameter enables you conditionally link to different views with the same hyperlink. First, configure multiple link resources under the same inner panel that have the same link ID except for a conditional suffix. For example, configure one link with ID YOMD010I01L010001 that points to one view and another link with ID YOMD010I01L010002 that points to a different view. Then, in the JSP, you can use this function within an <a> tag to conditionally link to different views by passing different values for the conditionalLinkId parameter.

Syntax

getDetailHrefOptions(String linkIdSuffix, String conditionalLinkId, String entityKey, String extraParams)

Input parameters

linkIdSuffix - Required. Link ID suffix. A resource of type Link is named as <current inner panel's Resource ID><suffix>. For instance, if the current inner panel's Resource ID is YOMD010I01, a link ID is YOMD010I01L01 and the suffix is L01. Pass only the suffix L01.

conditionalLinkId - Required. Portion of the suffix of the link ID. Used to conditionally link to different views.

entityKey - Required. Key (formed through the makeXMLInput JSP tag) that must be passed on to the view that is invoked by selecting this link.

extraParams - Required. String containing extra parameters that are appended to the URL that is formed for the <a href> tag. The string should start with an ampersand (&) and contain name value pairs in the syntax name=value. Because there is a size limit on what can be passed in a URL, use this parameter only when absolutely necessary. Typically, each view should only take the key and retrieve other details from an API based on that key.

Output parameters

A string containing href="" and onclick="" attributes that must be plugged into an <a> tag in HTML.

The resource of type link is not permission controlled. However, the view to which a link points is permission controlled. Still since this function is called inside an <a> tag, the link is formed regardless of whether or not the user has permissions for the view to which the link points. If the user selects the link, the view that is displayed gives an Access Denied message.

Example

This function is useful when a specific hyperlink on a screen must link across document types. For example, a list of shipments on a Delivery Plan screen could be shipments for different document types (order and purchase order shipments). The detail view that must be shown for the two types of shipments is different. The document type of the shipment can be used as the conditionalLinkId.

<a <%=getDetailHrefOptions("L01", getValue("Shipment", 
"xml:/Shipment/@DocumentType"), getParameter("shipmentKey"), "")%>>
		<yfc:getXMLValue binding="xml:/Shipment/@ShipmentNo"/>
</a>

This example shows the call to the getValue() function returns the document type of the shipment that is used as the conditionalLinkId. For this example to work, the inner panel using this JSP should have to link resources defined with the following properties:

Link 1: ID="YDMD100I02L010001" View ID="YOMD330" 
Link 2: ID="YDMD100I02L010005" View ID="YOMD7330" 
getDoubleFromLocalizedString -