<%@ page import="ro.emid.common.utils.ObjectUtils" %>
<%@ page import="java.util.List" %>
<%@ page import="ro.emid.common.types.CategoryOD" %>
<%@ page import="ro.emid.common.db.CategoryODAccessDB" %>
<%
    long parentId = ObjectUtils.getIntValue(request.getParameter("parentId"), 0);
    long selectedValue = ObjectUtils.getIntValue(request.getParameter("selectedValue"), 0);
    boolean disabled = ObjectUtils.getStringValue(request.getParameter("disabled")).equals("true");
    String selectName = ObjectUtils.getStringValue(request.getParameter("selectName"));
%>
<respmesg>

    <% List list = CategoryODAccessDB.getChildCategs(parentId); %>

    <select class="gSAPSelect" name="<%=selectName%>" <%=disabled? "disabled" : ""%>>
        <option value="-1" >Selectati:</option>
        <% for (int i = 0; i < list.size(); i++) {
            CategoryOD category = (CategoryOD) list.get( i);%>
            <option value="<%=category.getId()%>" <%=category.getId() == selectedValue ? "selected" : ""%> ><%=category.getName()%></option>
        <% } %>
    </select>
</respmesg>
