<%@  page import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils"%>
<%   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources");

   if (session.getAttribute("DeviceType").equals("pocket")) {
      c.set("mvmode", "mvtxt");
   } else {
      c.set("mvmode", "mvsel");
   } %>


<HTML>
<HEAD>
	<TITLE><%= c.var("bookTitle") %></TITLE>
	<LINK rel='stylesheet' href='<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>'>
	<jsp:include page='<%= c.getPath("dev/PageScripts_inc.jsp") %>' flush="true" />
	<jsp:include page='<%= c.getPath("dev/eMFrameScripts_inc.jsp") %>' flush="true" />
	<jsp:include page='<%= c.getPath("dev/OSScripts_inc.jsp") %>' flush="true" />
	<jsp:include page='<%= c.getPath("dev/ValidateIntegerScripts_inc.jsp") %>' flush="true" />
    <% c.set("MVStringEditor_mode", c.var("mvmode")); %>
	<jsp:include page='<%= c.getPath("dev/MVStringEditorScripts_inc.jsp") %>' flush="true" />
	<script language="JavaScript">
         function isPageValid()
         {
            document.form.Groups.value=mvGetValuesAsPack("GroupList");
            return true;
         }

         function init()
         {
            mvLoadFromPack("GroupList", "<%= c.toScript(c.var("Groups")) %>");
            mvFocus("GroupList");

            returnFromOS();
         }
	</script>
</HEAD>

<BODY onload="init()">
<FORM name="form" method=post action="webacc" onSubmit="return false">
   <jsp:include page='<%= c.getPath("dev/Messagebar_inc.jsp") %>' flush="true" />
	<jsp:include page='<%= c.getPath("dev/BookVars_inc.jsp") %>' flush="true" />

   <span class="mediumtext"><%= c.var("attributeDisplayName") %>:<BR></span>
   <INPUT name='Groups' type=hidden value="">


 <%-- ------------------------------------------------- --%>
 <%-- Note: we are not currenlty disabling this control --%>
 <%--       if the user doesn't have rights.            --%>
 <%-- ------------------------------------------------- --%>
   <%
      c.set("MVStringEditor_size", "10");
      c.set("MVStringEditor_mode", c.var("mvmode"));
      c.set("MVStringEditor_objectTypeName", c.var("osFilter"));
      c.set("MVStringEditor_name", "GroupList");
      c.set("MVStringEditor_minLength", "1");
      c.set("MVStringEditor_maxLength", "256");
      c.set("MVStringEditor_ignoreCase", "true");
      c.set("MVStringEditor_enforceUnique", "true");
      c.set("MVStringEditor_width", "450");
      c.set("MVStringEditor_showCount", "true");
      c.set("MVStringEditor_history", "true");

      String key1 = "eDirRights$target$" + c.var("primaryAttributeName");
      String key2 = "eDirRights$target$" + c.var("secondaryAttributeName");
      boolean readWrite = true;
      if (c.var("secondaryAttributeName") == "")
      {
         readWrite = c.var(key1).equals("RW");
      }
      else
      {
         readWrite = c.var(key1).equals("RW") && c.var(key2).equals("RW");
      }

      if (!readWrite)
      {
         c.set("MVStringEditor_readonly", "true");
      }
   %>
   <jsp:include page='<%= c.getPath("dev/MVStringEditor_inc.jsp") %>' flush="true" />

</FORM>
<jsp:include page='<%= c.getPath("dev/OSFooter_inc.jsp") %>' flush="true" />
</BODY>
</HTML>
