<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils" %>
<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/x.tld" prefix="x" %>


<%
   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources");
   if ( c.notdef("MVTextbox.formName")) { c.set("MVTextbox.formName", "forms[0]");    }
   if ( c.notdef("MVTextbox.width")) {    c.set("MVTextbox.width", c.minus(c.string("UI.textboxPixel"), "2"));    }
   if ( c.notdef("MVTextbox.bgColor")) {  c.set("MVTextbox.bgColor", "white");    }
%>

<iman:stringtable bundle="DevResources"/>
<%--setLocale sets the charset back to ISO so we need to add this line to fix it--%>
<% response.setContentType("text/html;charset=utf-8"); %>


<iman:dump/>

<TABLE bgcolor="<%= c.var("MVTextbox.bgColor") %>">
   <TR>
      <TD>
         <SELECT name="<%= c.var("MVTextbox.name") %>" width="<%= c.var("MVTextbox.width") %>" height="200" style="width:<%= c.var("MVTextbox.width") %>">
            <%-- Load values from XML --%>
            <c:if test="${not empty MVTextbox_xmlNodeSet}">
               <x:forEach select="$MVTextbox_xmlNodeSet/value">
                   <OPTION value="<x:out select="."/>"><x:out select="."/>
               </x:forEach>
            </c:if>
         </SELECT>
      </TD>

      <% if(!c.var("MVTextbox.readonly").equals("true")) { %>
         <TD><A href="javascript:MVOctetStringAdd('document.<%= c.var("MVTextbox.formName") %>.<%= c.var("MVTextbox.name") %>');"><IMG alt="<iman:string key="Widgets.addItem"/>" src="<%= c.getModulesUrl() + "/dev/images/iconadd.gif" %>" border="0"></a></TD>
         <TD><A href="javascript:mvselRemove(document.<%= c.var("MVTextbox.formName") %>.<%= c.var("MVTextbox.name") %>);"><IMG alt="<iman:string key="Widgets.removeItem"/>" src="<%= c.getModulesUrl() %>/dev/images/iconremove.gif" border="0"></a></TD>
         <% if (c.var("MVTextbox.mode").equals("DN") == false) { %>
            <TD><A href="javascript:MVOctetStringEdit(,document.<%= c.var("MVTextbox.formName") %>.<%= c.var("MVTextbox.name") %>,'document.<%= c.var("MVTextbox.formName") %>.<%= c.var("MVTextbox.name") %>');"><IMG alt="<iman:string key="Widgets.editItem"/>" src="<%= c.getModulesUrl() %>/dev/images/iconedit.gif" border="0"></a></TD>
         <% } %>
      <% } %>
   </TR>
</TABLE>
