/* Automatically generated.
 * Copyright (c) 2000-2006 by SAP AG, Walldorf.,
 * http://www.sap.com
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of SAP AG, Walldorf. You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms
 * of the license agreement you entered into with SAP.
 * Do not edit.
 */

import ro.emid.common.db.CategoryAccessDB;
import java.sql.Date;
import java.util.Calendar;
import java.util.List;
import ro.emid.incidente.obj.*;
import ro.emid.common.db.NomAccessDB;
import ro.emid.common.db.DataDB;
import ro.emid.incidente.IncidenteSessionUtils;
import ro.emid.common.types.*;
import ro.emid.common.constants.*;
import ro.emid.common.types.Category;
import ro.emid.incidente.IncidenteSessionUtils;
import ro.emid.common.utils.SessionUtils;
import ro.emid.common.types.User;
import ro.emid.common.constants.AppConstants;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public class JEE_jsp_WEB_2d_INF_pagelet_incidente_editFiltruIncidente_1495030451401 extends com.sap.engine.services.servlets_jsp.lib.jspruntime.JspBase{

	public void _jspService(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
	{
		//isXml=false
		JspFactory  _jspFactory     = JspFactory.getDefaultFactory();
		PageContext pageContext = _jspFactory.getPageContext(this,request,response,null,true,32768,true);
		ServletConfig config = pageContext.getServletConfig();
		ServletContext application = pageContext.getServletContext();
		com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl _jspx_pageContext = (com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl) pageContext;
		com.sap.engine.services.servlets_jsp.server.application.InjectionWrapper _jspx_resourceInjector = ((com.sap.engine.services.servlets_jsp.server.application.ServletContextImpl)_jspx_pageContext.getServletContext()).getApplicationContext().getInjectionWrapper();
		HttpSession session = pageContext.getSession();
		if (!response.isCommitted()) {
		response.setContentType("text/html;charset=UTF-8");
		}
		JspWriter   out     = pageContext.getOut();
		java.lang.Object page = this;
		try {
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(1,55);to=(2,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(2,34);to=(3,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(3,39);to=(4,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(4,35);to=(5,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(5,44);to=(6,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(6,50);to=(7,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(7,45);to=(8,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(8,60);to=(9,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(9,43);to=(10,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(10,47);to=(13,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(1,50);to=(2,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(2,60);to=(3,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(3,54);to=(4,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(4,46);to=(5,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(5,58);to=(6,0)]
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(6,50);to=(8,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/declaratii.jsp";from=(8,0);to=(34,2)]
			
    final boolean printVersion = request.getParameter("printVersion") != null && "true".equals( request.getParameter("printVersion")) || request.getAttribute("printVersion") != null && "true".equals( request.getAttribute("printVersion")) ;

    final User user = SessionUtils.getUserLogat(session);

    Category filiala = IncidenteSessionUtils.getFiliala(session);
    if(filiala == null){
        filiala = new Category();
    }

    Category sucursala = IncidenteSessionUtils.getSucursala(session);
    if(sucursala == null){
        sucursala = new Category();
    }

    Category centruExploatare = IncidenteSessionUtils.getCentru(session);
    if(centruExploatare == null){
        centruExploatare = new Category();
    }

    Category formatiaDeLucru = IncidenteSessionUtils.getFormatia(session);
    if(formatiaDeLucru == null){
        formatiaDeLucru = new Category();
    }

    boolean isCuSectiiSiCentre = ((sucursala != null && sucursala.isCuSectiiSiCentre()) || (centruExploatare != null && centruExploatare.isCuSectiiSiCentre()));

// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(13,48);to=(15,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(15,0);to=(15,46)]
			 if (request.getAttribute("act") !=null) {
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(15,46);to=(23,0)]
			out.print("\r\n<script type=\"text/javascript\">\r\n    try{\r\n        opener.reloadData();\r\n    }catch( e){\r\n    }\r\n    window.close();\r\n</script>\r\n");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(23,0);to=(23,10)]
			}else{
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(23,10);to=(25,0)]
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(25,0);to=(35,2)]
			
    FiltruIncidente filtru = null;
    if( IncidenteSessionUtils.isFiltruIncidente(session)){
        filtru = IncidenteSessionUtils.getFiltruIncidente(session);
    }else if( IncidenteSessionUtils.isFiltruEchipamente(session)){
        filtru = IncidenteSessionUtils.getFiltruEchipamente(session);
    }

    final String value_data_start = AppConstants.format(filtru.getDataStart());
    final String value_data_stop  = AppConstants.format(filtru.getDataStop());

// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(35,2);to=(48,49)]
			out.print("\r\n\r\n<style type=\"text/css\">\r\n    legend{\r\n        font-weight: bold;\r\n    }\r\n</style>\r\n\r\n<TABLE class=\"gsapthead\" align=center border=0 cellPadding=10 cellSpacing=0 width=\"100%\">\r\n    <TBODY>\r\n        <TR>\r\n            <TD>\r\n                <TABLE align=center border=0 cellPadding=1 cellSpacing=0 width=\"100%\" class=\"gsaptd\">\r\n                    <FORM NAME=\"zaforma\" ACTION=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(48,49);to=(48,75)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(48,75);to=(55,40)]
			out.print("\" METHOD=POST style=\"margin: 0\">\r\n                        <INPUT TYPE=\"hidden\" NAME=\"action\" VALUE=\"saveFiltruIncidente\" />\r\n                        <INPUT TYPE=\"hidden\" NAME=\"refreshData\" VALUE=\"false\" />\r\n                        <TBODY>\r\n                            <TR>\r\n                                <TD colspan=\"2\">\r\n                                    <CENTER><b>\r\n                                        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(55,40);to=(55,99)]
			 if( IncidenteSessionUtils.isFiltruIncidente(session)){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(55,99);to=(57,40)]
			out.print("\r\n                                            Configurare FILTRU Incidente\r\n                                        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(57,40);to=(57,106)]
			}else if( IncidenteSessionUtils.isFiltruEchipamente(session)){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(57,106);to=(59,40)]
			out.print("\r\n                                            Configurare FILTRU Echipamente\r\n                                        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(59,40);to=(59,45)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(59,45);to=(66,77)]
			out.print("\r\n                                    </b></CENTER>\r\n                                </TD>\r\n                            </TR>\r\n                            <tr>\r\n                                <td>\r\n                                    <fieldset style=\"margin-top: 0\">\r\n                                        <legend><input type=\"checkbox\" name=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(66,77);to=(66,123)]
			out.print(FiltruIncidenteConstants.PERIOADA_CHECKED);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(66,123);to=(66,191)]
			out.print("\" id=\"perioada_checked\" value=\"1\" onclick=\"enableDateInputs( this)\" ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(66,191);to=(66,239)]
			out.print(filtru.isPerioadaChecked() ? "checked" : "");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(66,239);to=(67,93)]
			out.print(" > <label for=\"perioada_checked\">Perioada</label></legend>\r\n                                        &nbsp;&nbsp;<input type=\"text\" id=\"data_start\" name=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(67,93);to=(67,133)]
			out.print(FiltruIncidenteConstants.DATA_START);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(67,133);to=(67,151)]
			out.print("\" size=\"8\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(67,151);to=(67,172)]
			out.print(value_data_start);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(67,172);to=(67,174)]
			out.print("\" ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(67,174);to=(67,223)]
			out.print(filtru.isPerioadaChecked() ? "" : "disabled");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(67,223);to=(67,275)]
			out.print("  /> <a href=\"#\" id=\"trigger_data_start\" ><img src=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(67,275);to=(67,330)]
			out.print(AppConstants.WEB_RESOURCE_PATH + "/images/cal.gif");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(67,330);to=(68,80)]
			out.print("\" width=\"16\" height=\"16\" border=\"0\" alt=\"Apasa pt. a selecta data.\"></a> -\r\n                                        <input type=\"text\" id=\"data_stop\" name=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(68,80);to=(68,119)]
			out.print(FiltruIncidenteConstants.DATA_STOP);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(68,119);to=(68,137)]
			out.print("\" size=\"8\" value=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(68,137);to=(68,157)]
			out.print(value_data_stop);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(68,157);to=(68,159)]
			out.print("\" ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(68,159);to=(68,208)]
			out.print(filtru.isPerioadaChecked() ? "" : "disabled");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(68,208);to=(68,259)]
			out.print(" /> <a href=\"#\"  id=\"trigger_data_stop\" ><img src=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(68,259);to=(68,314)]
			out.print(AppConstants.WEB_RESOURCE_PATH + "/images/cal.gif");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(68,314);to=(106,28)]
			out.print("\" width=\"16\" height=\"16\" border=\"0\" alt=\"Apasa pt. a selecta data.\"></a>\r\n                                    </fieldset>\r\n\r\n                                    <script type=\"text/javascript\">\r\n                                        function enableDateInputs( check){\r\n                                            $(\"data_start\").disabled = !check.checked;\r\n                                            $(\"data_stop\").disabled = !check.checked;\r\n\r\n                                            if( check.checked){\r\n                                                $(\"trigger_data_start\").style.visibility = \'\';\r\n                                                $(\"trigger_data_stop\").style.visibility = \'\';\r\n                                            }else{\r\n                                                $(\"trigger_data_start\").style.visibility = \'hidden\';\r\n                                                $(\"trigger_data_stop\").style.visibility = \'hidden\';\r\n                                            }\r\n                                        }\r\n\r\n\r\n                                         Calendar.setup(\r\n                                            {\r\n                                              inputField  : \"data_start\",         // ID of the input field\r\n                                              ifFormat    : \"%d.%m.%Y\",    // the date format\r\n                                              button      : \"trigger_data_start\"       // ID of the button\r\n                                            }\r\n                                          );\r\n\r\n                                          Calendar.setup(\r\n                                            {\r\n                                              inputField  : \"data_stop\",         // ID of the input field\r\n                                              ifFormat    : \"%d.%m.%Y\",    // the date format\r\n                                              button      : \"trigger_data_stop\"       // ID of the button\r\n                                            }\r\n                                          );\r\n\r\n                                          enableDateInputs($(\"perioada_checked\"));\r\n                                    </script>\r\n                                </td>\r\n                            </tr>\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(106,28);to=(106,114)]
			 if( filtru.getCriteriiFiltru() != null && filtru.getCriteriiFiltru().size() > 0){
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(106,114);to=(112,40)]
			out.print("\r\n                            <tr>\r\n                                <td>\r\n                                    <fieldset>\r\n                                        <legend>Lista criterii filtrare</legend>\r\n                                        <table class=\"gSAPTHEAD\" id=\"criteriiTable\" width=\"100%\" style=\"BACKGROUND-COLOR: white\" cellspacing=\"1\">\r\n                                        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(112,40);to=(215,85)]
			
                                            final List listaCriterii = filtru.getCriteriiFiltru();
                                            for (int i = 0; i < listaCriterii.size(); i++) {
                                                final CriteriuFiltruIncidente criteriu = filtru.getCriteriu(i);


                                                final StringBuffer text = new StringBuffer();
                                                if (criteriu.getInclusivExclusiv() == CriteriuFiltruIncidenteConstants.VALUE_INCLUSIV) {
                                                    text.append("<b>Include</b> ");
                                                } else if (criteriu.getInclusivExclusiv() == CriteriuFiltruIncidenteConstants.VALUE_EXCLUSIV) {
                                                    text.append("<b>Exclude</b> ");
                                                }

                                                if( criteriu.getFormatiaId() > 0){
                                                    final Category formatia = CategoryAccessDB.getById( criteriu.getFormatiaId());
                                                    if( formatia != null) text.append("<span title=\"Incidentele din Formatia de lucru\">").append( formatia.getName()).append("</span>, ");
                                                }

                                                if ( criteriu.getAnsambluId() != -1) {
                                                    final Nomenclator ansamblu = NomAccessDB.getNom( criteriu.getAnsambluId());
                                                    if (ansamblu != null) text.append("<span title=\"Ansamblul Functional\">").append( ansamblu.getDescriere()).append("</span>, ");
                                                }

                                                if (criteriu.getStatieId() != -1) {
                                                    final ro.emid.common.types.DataObj data = DataDB.getById(criteriu.getStatieId(), DataDB.isLocFunctional(NomConstants.NOM_STATII));
                                                    if (data != null)
                                                        text.append("<span title=\"Statia\">").append(data.getNume()).append("</span>, ");
                                                }

                                                if (criteriu.getCelulaId() != -1) {
                                                    final DataObj data = DataDB.getById(criteriu.getCelulaId(), DataDB.isLocFunctional(NomConstants.NOM_CELULE));
                                                    if (data != null)
                                                        text.append("<span title=\"Celula\">").append(data.getNume()).append("</span>, ");
                                                }

                                                if (criteriu.getBaraId() != -1) {
                                                    final DataObj data = DataDB.getById(criteriu.getBaraId(), DataDB.isLocFunctional(NomConstants.NOM_BARE));
                                                    if (data != null)
                                                        text.append("<span title=\"Bara\">").append(data.getNume()).append("</span>, ");
                                                }

                                                if (criteriu.getBobinaId() != -1) {
                                                    final DataObj data = DataDB.getById(criteriu.getBobinaId(), DataDB.isLocFunctional(NomConstants.NOM_BOBINE));
                                                    if (data != null)
                                                        text.append("<span title=\"Bobina\">").append(data.getNume()).append("</span>, ");
                                                }

                                                if (criteriu.getLinieId() != -1) {
                                                    final DataObj data = DataDB.getById(criteriu.getLinieId(), DataDB.isLocFunctional(NomConstants.NOM_LINII));
                                                    if (data != null)
                                                        text.append("<span title=\"Linia\">").append(data.getNume()).append("</span>, ");
                                                }

                                                if (criteriu.getDerivatieId() != -1) {
                                                    final DataObj data = DataDB.getById(criteriu.getDerivatieId(), DataDB.isLocFunctional(NomConstants.NOM_DERIVATIE));
                                                    if (data != null)
                                                        text.append("<span title=\"Derivatia\">").append(data.getNume()).append("</span>, ");
                                                }

                                                if (criteriu.getPA_PT_Id() != -1) {
                                                    final DataObj data = DataDB.getById(criteriu.getPA_PT_Id(), DataDB.isLocFunctional(NomConstants.NOM_PA_PT));
                                                    if (data != null)
                                                        text.append("<span title=\"PA/PT\">").append(data.getNume()).append("</span>, ");
                                                }

                                                if (criteriu.getTrafoId() != -1) {
                                                    final DataObj data = DataDB.getById(criteriu.getTrafoId(), DataDB.isLocFunctional(NomConstants.NOM_TRAFO));
                                                    if (data != null)
                                                        text.append("<span title=\"Trafo\">").append(data.getNume()).append("</span>, ");
                                                }

                                                if ( criteriu.getCauzaGrupaId() != -1){
                                                    final Nomenclator nom = NomAccessDB.getNom( criteriu.getCauzaGrupaId());
                                                    if( nom != null)
                                                        text.append("<span title=\"Cauza Grupa\">").append(nom.getDescriere()).append("</span>, ");
                                                }

                                                if( criteriu.getCauzaId() != -1){
                                                    final Nomenclator nom = NomAccessDB.getNom( criteriu.getCauzaId());
                                                    if( nom != null)
                                                        text.append("<span title=\"Cauza\">").append(nom.getDescriere()).append("</span>, ");
                                                }

                                                if ( !ro.emid.common.utils.Util.isZeroLenght(criteriu.getEnOp())){
                                                    text.append("Energia nelivrata ").append(criteriu.getEnOp()).append(' ').append(criteriu.getEnergieNelivrata()).append(',');
                                                }

                                                if( criteriu.getModCompletareConsumatori() != -1){
                                                    text.append("Compl.consum. - ").append(
                                                            criteriu.getModCompletareConsumatori()==IncidentConstants.ConsumatoriCompletati.AUTOMAT?"automat":
                                                            criteriu.getModCompletareConsumatori()==IncidentConstants.ConsumatoriCompletati.MANUAL?"manual":"n/a"
                                                    ).append(',');
                                                }

                                                if( criteriu.getMediul() != -1){
                                                    text.append("mediu - ").append(
                                                            criteriu.getMediul()==IncidentConstants.Mediul.DIN_NOMENCLATOR?"conf.nomenclator":
                                                            criteriu.getMediul()==IncidentConstants.Mediul.URBAN?"urban":
                                                            criteriu.getMediul()==IncidentConstants.Mediul.RURAL?"rural":"n/a"
                                                    );
                                                }


                                                criteriu.setText( text.toString());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(215,85);to=(218,56)]
			out.print("\r\n                                                <tr valign=\"top\">\r\n                                                    <td align=\"left\">\r\n                                                        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(218,56);to=(218,79)]
			out.print(criteriu.getText());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(218,79);to=(221,78)]
			out.print("\r\n                                                    </td>\r\n                                                    <td width=\"1%\" align=\"center\" nowrap>\r\n                                                        <a class=\"link\" href=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(221,78);to=(221,104)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(221,104);to=(221,148)]
			out.print("?action=editCriteriuFiltrareIncidente&index=");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(221,148);to=(221,154)]
			out.print(i);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(221,154);to=(222,78)]
			out.print("\" target=\"frameEditCriteriu\">editeaza</a>&nbsp;\r\n                                                        <a class=\"link\" href=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(222,78);to=(222,104)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(222,104);to=(222,150)]
			out.print("?action=removeCriteriuFiltrareIncidente&index=");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(222,150);to=(222,156)]
			out.print(i);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(222,156);to=(225,40)]
			out.print("\" onclick=\"return confirm(\'Stergeti criteriul ?\')\">sterge</a>\r\n                                                    </td>\r\n                                                </tr>\r\n                                        ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(225,40);to=(225,45)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(225,45);to=(234,28)]
			out.print("\r\n                                        </table>\r\n\r\n                                        <script type=\"text/javascript\">\r\n                                            var tableCriterii = new Table(\"criteriiTable\", \"tableCriterii\");\r\n                                        </script>\r\n                                    </fieldset>\r\n                                </td>\r\n                            </tr>\r\n                            ");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(234,28);to=(234,33)]
			}
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(234,33);to=(239,78)]
			out.print("\r\n                            <tr>\r\n                                <td>\r\n                                    <fieldset>\r\n                                        <legend>Editare criteriu filtrare</legend>\r\n                                        <iframe name=\"frameEditCriteriu\" src=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(239,78);to=(239,104)]
			out.print(AppConstants.APP_NAME);
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(239,104);to=(271,0)]
			out.print("?action=editCriteriuFiltrareIncidente\" frameborder=\"0\" width=\"100%\" height=\"400\"></iframe>\r\n                                    </fieldset>\r\n                                </td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td>\r\n                                    <input type=\"submit\" value=\"Aplica Filtru\" />\r\n                                    <input type=\"button\" value=\"Renunta\" onclick=\"window.close()\"/>\r\n                                </td>\r\n                            </tr>\r\n                        </TBODY>\r\n                    </FORM>\r\n                </TABLE>\r\n            </TD>\r\n        </TR>\r\n    </TBODY>\r\n</TABLE>\r\n\r\n<script type=\"text/javascript\">\r\n    function refreshData(){\r\n        document.zaforma.refreshData.value = \"true\";\r\n        document.zaforma.submit();\r\n    }\r\n\r\n    function resetComboLeaveFirstOption( oCombo){\r\n        for (var i = 1; oCombo.options.length > 1;) {\r\n            oCombo.options[i] = null;\r\n        }\r\n        \r\n        alert( \'Local resetComboLeaveFirstOption\');\r\n    }\r\n</script>\r\n");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-incidente/servlet_jsp/emid-incidente/root/WEB-INF/pagelet/incidente/editFiltruIncidente.jsp";from=(271,0);to=(271,5)]
			}
// end
		} catch (ThreadDeath tde) { throw tde;
		} catch (OutOfMemoryError ome) { throw ome;
		} catch (Throwable t) {
			if (!(t instanceof SkipPageException)) {
				try {
					out.clear();
				} catch(java.io.IOException _jspioex) {}
				_jspx_pageContext.handlePageException(t);
			}
		}finally{
			_jspFactory.releasePageContext(pageContext);
		}
	}

}
