<%@ page import="com.novell.emframe.dev.*,
                 com.novell.admin.ns.nds.NDSNamespace,
                 com.novell.application.console.snapin.ObjectEntry,
                 com.novell.admin.common.exceptions.SPIException,
                 com.novell.webaccess.common.JSPConduit"%>
<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" %>
<%@ 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 jspc = JSPConduit.getJSPConduit(request);
   jspc.stringTable("DevResources");
   jspc.stringTable("BaseResources");
   jspc.stringTable("FwResources"); %>
   
<iman:stringtable bundle="DevResources" />
<iman:stringtable bundle="FwResources" />


<%
   MContext taskContext = eMFrameFactory.getMContext(request);
%>
<HTML>
<head>
<script language="javascript">
var selectToDel = '<iman:toScript><iman:string key="Editor.selectToDelete" /></iman:toScript>';
var selectToEdit = '<iman:toScript><iman:string key="Editor.selectToEdit" /></iman:toScript>';
</script>
<SCRIPT src="<%= session.getAttribute("ModulesPath") %>/dev/javascripts/eMFrameScripts.js"></SCRIPT>
<SCRIPT src="<%= session.getAttribute("ModulesPath") %>/fw/javascripts/MVCIListEditorScripts.js"></SCRIPT>
<script language="javascript">
		
			function OnDivScroll()
			{
				var mvCIVal = document.getElementById("MVCIList_Editor");
				if (mvCIVal.options.length > 10)
				{
					mvCIVal.size=mvCIVal.options.length;
				}
				else
				{
					mvCIVal.size=10;
				}
			}
</script>
</head>
<BODY>
<form name="mvcilistEditirForm">
<BR>    
<TABLE cellpadding="0" cellspacing="0">
   <TR>
      <TD>
      
	<div id="divMVCIListValues" style="OVERFLOW: auto;WIDTH: 250px;HEIGHT: 175px"	onscroll="OnDivScroll();">
         <SELECT name="MVCIList_Editor" id="MVCIList_Editor" size=10 style="OVERFLOW: hidden;">

         <x:forEach select="$MVStringEditor_xmlNodeSet/value">
         	<c:set var="packedValues"><x:out select="."/></c:set>
         	<%
         		String packedValues = (String)pageContext.findAttribute("packedValues");
         	    String packedTempArr[] = eMFrameUtils.unpack(packedValues,taskContext);
         	    for(int packCounter=0;packCounter< packedTempArr.length;packCounter++){
         	    	packedTempArr[packCounter] = eMFrameUtils.xmlDecode(packedTempArr[packCounter]);
         	    }
         	    String tempPackedValues = eMFrameUtils.pack(packedTempArr,taskContext);
           	    packedValues=tempPackedValues;
         	    String temp[] = eMFrameUtils.unpack(packedValues,taskContext);
         	    String showValue = "";
         		for(int i=0;i< temp.length; i++)
         		{
         			if(i>0) 
         				showValue += " - ";
         			showValue += temp[i];
         		}
         		
         		
         	
         	%>
         	<OPTION value=<%=packedValues %>><%=showValue%></OPTION>
         </x:forEach>
         </SELECT>
     </div>  
      </TD>

      <TD valign="top"><A href="javascript:addMVCIListItem()"><IMG alt="<iman:string key="Widgets.addItem"/>" src="<%= session.getAttribute("ModulesPath") %>/dev/images/iconadd.gif" border="0"></a><iman:spacer/></TD>
      <TD valign="top"><A href="javascript:deleteMVCIListItem()"><IMG alt="<iman:string key="Widgets.removeItem"/>" src="<%= session.getAttribute("ModulesPath") %>/dev/images/iconremove.gif" border="0"></A><iman:spacer/></TD>
      <TD valign="top"><A href="javascript:editMVCIListItem()"><IMG alt="<iman:string key="Widgets.editItem"/>" src="<%= session.getAttribute("ModulesPath") %>/dev/images/iconedit.gif" border="0"></A><iman:spacer/></TD>
   </TR>
</TABLE>
</form>
</BODY>
</HTML>
