<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit2, com.novell.emframe.dev.eMFrameUtils" %>
<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
<%--
   TCFull_inc.jsp                                                                          
   
   Parameters:                                 
     - Task.Icon.name                                                               
     - Task.Icon.alt                                                                
     - Task.displayName                                                             
     - Task.nextState                                                               
     - Task.nextMerge                                                               
     - must call eMFrameUtils.setupTargetChooser() to set parameters for TC widget  
--%>
<!-- Begin TCFull_inc.jsp (default) -->
<% JSPConduit2 c = JSPConduit2.getJSPConduit(request);

   /*======== default values =========*/
   if (c.var("Task.displayName").equals(""))  c.set("Task.displayName", c.var("Task.defaultDisplayName"));
   if (c.var("TC.controlName").equals(""))    c.set("TC.controlName", "eDir$target");
   if (c.var("Task.initialValue").equals("")) c.set("Task.initialValue", c.var("eDir$target"));
   if (c.var("Task.nextMerge").equals(""))    c.set("Task.nextMerge", c.var("nextMerge"));

   if (c.var("Task.Icon.name").equals(""))
   {
      c.set("Task.Icon.name", c.var("Task.DefaultIcon.name"));
      c.set("Task.Icon.alt", c.var("Task.DefaultIcon.alt"));
   }
%>

<HTML>
<HEAD>
	<TITLE><%= c.string("ProductName") %></TITLE>
	<LINK rel='stylesheet' href='<%= c.getModulesUrl() %>/dev/css/hf_style.css'>

   <iman:eMFrameScripts/>
   <iman:targetChooserScripts/>

   <SCRIPT language="JavaScript">
      function formSubmit()
      {
         if (validateTargetChooser())  //in TC.js
         {
            document.form.submit();
         }
      }
      
      function focusifpresent()
      {
      		var mode=getMode();
      		if(mode == "single")
      		{
      			document.getElementById("single").focus();	
      		}
      		else if(mode == "simple")
      		{
      			document.getElementById("quickFindFilter").focus();
      		}
      }
   </SCRIPT>
</HEAD>

<BODY onLoad="returnFromOS(); focusifpresent();">
   <FORM name="form" method=post action="webacc">

   <%-- System Variables --%>
   <INPUT type=hidden name="taskId"            value="<%= c.var("taskId") %>"/>
   <INPUT type=hidden name="error"             value="dev.GenErr"/>
   <INPUT type=hidden name="nextState"         value="<%= c.var("Task.nextState") %>"/>
   <INPUT type=hidden name="nextPage"          value=""/>
   <INPUT type=hidden name="activePage"        value=""/>
   <INPUT type=hidden name="eDirCommand"        value="read"/>
   <INPUT type=hidden name="merge"	           value="<%= c.var("Task.nextMerge") %>"/>
   <INPUT type=hidden name="eDirSearch"        value="<%= c.var("eDirSearch") %>"/>

   <%-- must use requestScope[] syntax since names have periods in them --%>
   <iman:taskHeader  title="${requestScope['Task.displayName']}" 
                     iconUrl="${requestScope['Task.Icon.name']}" 
                     iconAlt="${requestScope['Task.Icon.alt']}" 
                     helpFile="${requestScope['Task.helpFile']}" /><BR>
                     
   <iman:messagebar/>

   <% if (!c.var("TC.instructions").equals("")) { %>
      <DIV class="instructions"><%= c.var("TC.instructions") %><BR><BR></DIV>
   <% } %>

   <DIV class=mediumtext>
      <%-- display Target Chooser widget --%>
      <%-- must have called eMFrameUtils.setupTargetChooser() to setup desired parameters for target chooser --%>
      <iman:include page="dev/TC_inc.jsp"/>
   </DIV>
   <BR>

   <%
      if (pageContext.findAttribute("DeviceType").equals("pocket"))
      {
         int size = c.toInt("History.cout");
         if (size>0)
         {
            out.println(c.string("History.label") + "<BR>");
            for(int i=0; i<size; i++)
            {
               %><A href="#" onClick="document.forms[0].single.value='<%= c.toScript(c.var("History."+i+ ".name")) %>'"><%= c.toDisplay(c.var("History."+i+ ".name")) %></A><BR><%
            }
            out.println("<BR>");
         }
      }
   %>

   <iman:bar/>
   <iman:button key="OK" type="input" onClick="javascript:formSubmit();return false" />&nbsp;<iman:cancelBtn/>
   </FORM>
   
<FORM name="previewForm" id="previewForm" method="post" action="webacc" target="previewFrame" >
   <INPUT type=hidden name="taskId"    value="fw.PreviewObjectFilter" >
   <INPUT type=hidden name="nextState" value="initialState" >
   <INPUT type=hidden name="merge"     value="fw.TCPreviewFilter" >
   <INPUT type=hidden name="query"     value="" >
   <INPUT type=hidden name="filter"    value="" >
   <INPUT type=hidden name="container" value="" >
   <INPUT type=hidden name="subContainerSearch" value="false" >
   <INPUT type=hidden name="objectEntryCount" value="" >
   <INPUT type=hidden name="subClasses" value="" >
</FORM>
   <iman:osFooter/>  <%-- form to post data for object selector / history button --%>
</BODY>
</HTML>

<!-- End TCFull_inc.jsp (default) -->