GoToDetailView
You can review the details about the goToDetailView JSP function.
Description
This JSP function can be used to conditionally display different detail views based on the logic specified within a JSP page. This function can only be used in conjunction with detail views that have been defined as "redirector views". This function is useful when you need to conditionally navigation to a different detail view based on some logic (possibly determined by the output of an API call). In the JSP anchor page of a redirector view, use this function to ultimately navigate to the detail view that is shown to the user.
Syntax
void goToDetailView(HttpServletResponse response, String viewGroupId)
Input parameters
response - Required. The response object. Pass the "response" object as is from your redirector JSP.
viewGroupId - Required. The view group ID that is shown to the end user.
Output parameters
None.
JSP usage
This example shows the complete JSP that is the anchor page of the shipment detail redirector view. If the shipment that is displayed is a shipment for a provided service, then a different detail view is displayed. Note that the output of the getShipmentDetails() API is used to determine which view should be displayed.
<%@include file="/yfsjspcommon/yfsutil.jspf"%>
<%
String sViewGrp = "YOMD710";
if (isTrue("xml:/Shipment/@IsProvidedService")) {
sViewGrp = "YOMD333";
}
goToDetailView(response, sViewGrp);
%>