%
/******************************************************************************
* Copyright (c) 2000-2004 e-Deal
*
* e-Deal S.A.
* 55 rue Brillat Savarin
* 75013 Paris
* France
*
* T: +33 (0)1 53 80 80 30
* F: +33 (0)1 73 01 69 77
* http://www.e-deal.com
*
* La diffusion de ce code source sous quelque forme que ce soit sans
* l'autorisation de E-DEAL est interdite.
*
* Vous êtes autorisés à modifier ce code source uniquement pour votre usage
* propre et sous réserve que les mentions de copyright demeurent intactes.
*
* Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou
* implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour
* responsable des dommages pouvant résulter de l'utilisation de ce code
* source.
*
*
******************************************************************************/
/*****************************************************************************
* DESCRIPTION:
* Display a simple page, in order to inform the used.
* Display into a tab with a simple "close" button.
* Designed to be used as a popup.
*
*
******************************************************************************
* TYPE: self closed pop-up, no forward
******************************************************************************
* USAGE :
* Request Parameter or attributes:
* DisplaySimpleMessageAction.REQ_ATTRIB_MSGTITLE: (mandatory) the title to be displayed
* DisplaySimpleMessageAction.REQ_ATTRIB_MSGCONTENT: (mandatory) the message to be displayed.
* =>the msgtitle or content can be a label code or the text as is
* DisplaySimpleMessageAction.REQ_ATTRIB_TEXTTYPE: (optional) format of text passed
* =>DisplaySimpleMessageAction.REQ_VALUE_MSGTYPE_TEXT, (default), the message is transformed to html (line break...)
* =>DisplaySimpleMessageAction.REQ_VALUE_MSGTYPE_HTML="html", the message is leaved as it is
* =>DisplaySimpleMessageAction.REQ_VALUE_MSGTYPE_JAVASCRIPT="js", the message is transformed to html (line break...)
* Call:
* could be called directly or from the js function "display_simple_message(title,msg,texttype)" from global_js.jsp.
*******************************************************************************/
%><%@page session="true"%><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@ page import="com.edeal.frontline.Utils"%><%@ page import="com.edeal.frontline.controller.actions.DisplaySimpleMessageAction" %><%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><%
FlRequest flRequest = new FlRequest(request);
String msgTitle=flRequest.getRequestParameterOrAttribute(DisplaySimpleMessageAction.REQ_ATTRIB_MSGTITLE);
String msg=flRequest.getRequestParameterOrAttribute(DisplaySimpleMessageAction.REQ_ATTRIB_MSGCONTENT);
String formatToHtml=flRequest.getRequestParameterOrAttribute(DisplaySimpleMessageAction.REQ_ATTRIB_TEXTTYPE);
if (formatToHtml==null) {
formatToHtml=DisplaySimpleMessageAction.REQ_VALUE_MSGTYPE_HTML;
}
msgTitle=(msgTitle==null)?"":msgTitle;
msg=(msg==null)?"":msg;
msgTitle=Utils.getMessage(session,msgTitle,msgTitle);
msg=Utils.getMessage(session,msg,msg);
if (formatToHtml.equals(DisplaySimpleMessageAction.REQ_VALUE_MSGTYPE_TEXT)) {
msg=Utils.formatToWeb(msg,false);
} else if (formatToHtml.equals(DisplaySimpleMessageAction.REQ_VALUE_MSGTYPE_JAVASCRIPT)) {
msg=Utils.formatToWeb(msg,true);
}
%>