<%@ page import="org.apache.log4j.Logger"%>
<%@ page import="ro.emid.common.utils.ObjectUtils" %>
<%@ page import="ro.emid.callcenter.db.ClientEligibilAccessDB" %>
<%@ page import="ro.emid.callcenter.obj.Furnizor" %>
<%@ page import="ro.emid.callcenter.obj.FurnizorConstants" %>
<%
    final Logger LOG = Logger.getLogger("cautFurnizorForClientEligibilResp_jsp");
    final String whatToSearch = ObjectUtils.getStringValue(request.getParameter("q"));

    LOG.debug(" whatToSearch=" + whatToSearch);
    try {
        final Furnizor[] furnizori = ClientEligibilAccessDB.cautFurnizor(whatToSearch);
%>
<respmesg>
    <% for (int i = 0; i < furnizori.length; i++) {  %>
         <div onSelect="this.txtBox.value = '<%=furnizori[i].getNume()%>'; $('<%=FurnizorConstants.ID%>').value=<%=furnizori[i].getId()%>">
                <%=furnizori[i].getNume()%>
         </div>
    <% }%>
</respmesg>
<%} catch (Throwable t) {
    LOG.error("Eroare get lista clienti eligibili", t);
}%>