%@ page language="java" contentType="text/plain;charset=UTF-8"%>
<%@ page import="com.edeal.frontline.navigation.FlRequest" %>
<%@page import="com.edeal.frontline.controller.actions.UnicityAction"%>
<%@page import="com.edeal.frontline.controller.actions.custom.PopulationV2OperationsPrecheckAction"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><%
FlRequest flRequest = new FlRequest(request);
String formName = flRequest.getRequestParameterOrAttribute("formName");
if (formName != null) {
try {
Integer.parseInt(formName);
} catch (NumberFormatException nfe) {
formName = "'" + formName + "'";
}
} else {
formName = "0";
}
boolean alreadyExists = "1".equals(flRequest.getAttribute(UnicityAction.UNICITY_EXISTS_KEY));
boolean notsameType = "1".equals(flRequest.getAttribute(PopulationV2OperationsPrecheckAction.POPPRECHECK_TYPEERR));
String popIDToReplace = flRequest.getParameter("PopIDToReplace");
if (alreadyExists) {
String oldID = (String)flRequest.getAttribute(UnicityAction.UNICITY_OLDKEY);
%>
if (window.confirm('')) {
var f = window.document.forms[<%= formName %>];
f.PopIDToReplace.value = '<%= oldID %>';
submit();
}
<%
} else if (notsameType) {
%>
alert('');
<% } else if (StringUtils.isNotEmpty(popIDToReplace)) { %>
if (confirm('. ')) {
submit();
}
<%
} else {
%>
submit();
<% } %>