<%@  page import="com.novell.webaccess.common.JSPConduit,
                  java.util.ResourceBundle,
                  com.novell.emframe.dev.eMFrameUtils,
                  com.novell.emframe.dev.eMFrameFactory,
                  com.novell.emframe.fw.FwUtils" %>

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





<HTML>
<HEAD>
   <LINK rel="stylesheet" href="<c:out value="${ContextPath}"/>/portal/modules/dev/css/hf_style.css">

   <STYLE>
      td {font-size:12px};
   </STYLE>


   <iman:mvedScripts mode="mvie" />
   <iman:mvedScripts mode="mvsel" />
   <iman:osScripts/>
   <iman:eMFrameScripts/>
   <iman:include page="dev/TimeGridScripts_inc.jsp"/>

   <SCRIPT language="JavaScript" src="<c:out value="${ContextPath}"/>/portal/modules/fw/javascripts/TimeRestrictions.js"></SCRIPT>
   <LINK rel="stylesheet" href="<c:out value="${ContextPath}"/>/portal/modules/fw/css/TimeRestrictions.css">


   <SCRIPT>
      function mvedChange(name)
      {
         alert("An MVStringEditor has changed: " + name);
      }

      function onInit()
      {
      }

      function onExit()
      {
      }
   </SCRIPT>
</HEAD>

<BODY onLoad="onInit();">
<FORM name="form" method="post" action="webacc" onSubmit="return onExit();">



<%--   <a href="#" onClick="window.open('<c:out value="${ContextPath}"/>/servlet/frameservice?NPService=fw.LaunchService&NPAction=Launch&launch=fw.ModifyObject&launcher=fw.LaunchService&lifecycle=New&eDir$target=P:novellP');">Test PropertyBook</a>--%>

   <!---- edas and system variables  ---->
   <INPUT type="hidden" name="taskId" value="<c:out value="${taskId}"/>">
   <INPUT type="hidden" name="eDirCommand" value="Write">
   <INPUT type="hidden" name="eDir$target" value="<c:out value="${param.eDir$target}"/>">
   <INPUT type="hidden" name="merge" value="dev.GenConf">
   <INPUT type="hidden" name="error" value="dev.GenErr">


   <%
      String[] values = new String[] {"value1", "value2", "value3", "value4"};
      String pack = eMFrameUtils.pack(values, eMFrameFactory.getMContext(request));

      request.setAttribute("pack", pack);
      request.setAttribute("values", values);

      out.print(eMFrameUtils.getVersion(eMFrameFactory.getMContext(request)));
   %>


   <iman:taskHeader title="MVStringEditor Test"/><BR>

   <TABLE cellpadding="8px" style="border-width:1px">
      <TR>
         <TD colspan="2" bgColor="#999999"><B>Disable testing</B></TD>
      </TR>
      <TR>
         <TD>Regular Expression</TD>
         <TD><iman:mved  name="mved0130" regExpression="/[a-z]*/" /></TD>
      </TR>
      <TR>
         <TD>One line mode</TD>
         <TD><iman:mved mode="mvsel" name="mved010" items="${values}" onChangeCallback="mvedChange" /></TD>
         <TD><A href="javascript: mvDisable('mved010')">disable</A></TD>
         <TD><A href="javascript: mvEnable('mved010')">enable</A></TD>
      </TR>
      <TR>
         <TD>Multi line mode</TD>
         <% request.setAttribute("MVStringEditor_pack", pack); %>
         <TD><iman:mved mode="mvsel" name="mved011" size="10" /></TD>
         <TD><A href="javascript: mvDisable('mved011')">disable</A></TD>
         <TD><A href="javascript: mvEnable('mved011')">enable</A></TD>
      </TR>
      <TR>
         <TD>IE mode</TD>
         <TD><iman:mved mode="mvie" name="mved012" size="10" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
         <TD><A href="javascript: mvDisable('mved012')">disable</A></TD>
         <TD><A href="javascript: mvEnable('mved012')">enable</A></TD>
      </TR>
      <TR>
         <TD>Online mode</TD>
         <TD><iman:mved mode="mvsel" name="mved210" objectTypeName="User" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
         <TD><A href="javascript: mvDisable('mved210')">disable</A></TD>
         <TD><A href="javascript: mvEnable('mved210')">enable</A></TD>
      </TR>
      <TR>
         <TD>Multi line mode</TD>
         <TD><iman:mved mode="mvsel" name="mved211" size="10" objectTypeName="User" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
         <TD><A href="javascript: mvDisable('mved211')">disable</A></TD>
         <TD><A href="javascript: mvEnable('mved211')">enable</A></TD>
      </TR>
      <TR>
         <TD>IE mode</TD>
         <TD><iman:mved mode="mvie" name="mved212" size="10" objectTypeName="User" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
         <TD><A href="javascript: mvDisable('mved212')">disable</A></TD>
         <TD><A href="javascript: mvEnable('mved212')">enable</A></TD>
      </TR>
   </TABLE>




<%--   <iman:include page="dev/TimeGrid_inc.jsp"/>--%>
<%--   <SCRIPT>--%>
<%--      initTimeRestrictions("000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");--%>
<%--   </SCRIPT>--%>
<%-- -%>
<%--   <BR><BR>--%>



   <TABLE cellpadding="8px" style="border-width:1px">
      <TR>
         <TD colspan="2" bgColor="#999999"><B>MVSEL (one line)</B></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>Width: 150</TD>
         <TD><iman:mved mode="mvsel" name="mved01" width="150" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>bgColor=blue</TD>
         <TD><iman:mved mode="mvsel" name="mved02" bgColor="blue"  xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>readonly</TD>
         <TD><iman:mved mode="mvsel" name="mved03" readonly="true" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>objectTypeName=User</TD>
         <TD><iman:mved mode="mvsel" name="mved04" objectTypeName="User"/></TD>
      </TR>
      <TR>
         <TD>enforceUnique=false</TD>
         <TD><iman:mved mode="mvsel" name="mved05" enforceUnique="false"/></TD>
      </TR>
      <TR>
         <TD>ignoreCase=true</TD>
         <TD><iman:mved mode="mvsel" name="mved06" ignoreCase="true"/></TD>
      </TR>
      <TR>
         <TD>numbersOnly=true</TD>
         <TD><iman:mved mode="mvsel" name="mved07" numbersOnly="true"/></TD>
      </TR>
      <TR>
         <TD>upperBound=10 lowerBound=5</TD>
         <TD><iman:mved mode="mvsel" name="mved08" upperBound="10" lowerBound="5"/></TD>
      </TR>
      <TR>
         <TD>minLength=5 maxLength=10</TD>
         <TD><iman:mved mode="mvsel" name="mved09" minLength="5" maxLength="10"/></TD>
      </TR>

<%--     -MVStringEditor_xml               xml as a string--%>
<%--     -MVStringEditor_xml               xml as a nodeset (parsed using <x:parse ...>)--%>

   </TABLE>
   <BR><BR>
   <TABLE cellpadding="8px" style="border-width:1px">
      <TR>
         <TD colspan="2" bgColor="#999999"><B>MVSEL (multi line)</B></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>Width: 150</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved11" width="150" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>bgColor=blue</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved12" bgColor="blue"  xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>readonly</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved13" readonly="true" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>objectTypeName=User</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved14" objectTypeName="User"/></TD>
      </TR>
      <TR>
         <TD>enforceUnique=false</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved15" enforceUnique="false"/></TD>
      </TR>
      <TR>
         <TD>ignoreCase=true</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved16" ignoreCase="true"/></TD>
      </TR>
      <TR>
         <TD>numbersOnly=true</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved17" numbersOnly="true"/></TD>
      </TR>
      <TR>
         <TD>upperBound=10 lowerBound=5</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved18" upperBound="10" lowerBound="5"/></TD>
      </TR>
      <TR>
         <TD>minLength=5 maxLength=10</TD>
         <TD><iman:mved mode="mvsel" size="3" name="mved19" minLength="5" maxLength="10"/></TD>
      </TR>

<%--     -MVStringEditor_xml               xml as a string--%>
<%--     -MVStringEditor_xml               xml as a nodeset (parsed using <x:parse ...>)--%>

   </TABLE>
   <BR><BR>



   <TABLE cellpadding="8px" style="border-width:1px">
      <TR>
         <TD colspan="2" bgColor="#999999"><B>MVIE</B></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>Width: 150</TD>
         <TD><iman:mved name="mved1" width="150" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>bgColor=blue</TD>
         <TD><iman:mved name="mved2" bgColor="blue"  xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>Loading from XML String<BR>readonly</TD>
         <TD><iman:mved name="mved3" readonly="true" xml="<values><value>item1</value><value>item2</value></values>" /></TD>
      </TR>
      <TR>
         <TD>objectTypeName=User</TD>
         <TD><iman:mved name="mved4" objectTypeName="User"/></TD>
      </TR>
      <TR>
         <TD>enforceUnique=false</TD>
         <TD><iman:mved name="mved5" enforceUnique="false"/></TD>
      </TR>
      <TR>
         <TD>ignoreCase=true</TD>
         <TD><iman:mved name="mved6" ignoreCase="true"/></TD>
      </TR>
      <TR>
         <TD>numbersOnly=true</TD>
         <TD><iman:mved name="mved7" numbersOnly="true"/></TD>
      </TR>
      <TR>
         <TD>upperBound=10 lowerBound=5</TD>
         <TD><iman:mved name="mved8" upperBound="10" lowerBound="5"/></TD>
      </TR>
      <TR>
         <TD>minLength=5 maxLength=10</TD>
         <TD><iman:mved name="mved9" minLength="5" maxLength="10" onChangeCallback="mvedChange" /></TD>
      </TR>

<%--     -MVStringEditor_xml               xml as a string--%>
<%--     -MVStringEditor_xml               xml as a nodeset (parsed using <x:parse ...>)--%>

   </TABLE>
   <BR><BR>






   <HR color="#6B8899" size="2">
   <iman:button key="OK" onClick="document.form.submit()"/>



   <iman:osFooter/>
</FORM>
</BODY>
</HTML>



