<!--
 * awCommandsDemo.jsp
 *
 * Copyright © 1994-2004, Oracle. All rights reserved. Oracle grants
 * you ("Licensee") a non-exclusive, royalty-free, worldwide license to use,
 * modify and redistribute this software in source and binary code form, provided
 * that (i) this copyright notice and license appear on all copies of the
 * software; (ii) Licensee does not utilize the software in a manner disparaging
 * to Oracle; and (iii) Licensee does not utilize the software in a manner that
 * violates the terms of any Licensee agreement with Oracle.
 -->

<%@ taglib uri="http://xmlns.oracle.com/bibeans/jsp" prefix="orabi" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ page errorPage="cabo/bi/jsp/error.jsp" %>
<%@ page contentType="text/html;charset=windows-1252"%>

<%-- Start synchronization of the BI tags --%>
<% synchronized(session){ %>
<orabi:BIThinSession id="bisession1"  configuration="/BIJSPTagGuideOLAPConfig1.xml" >
  <%--  Business Intelligence definition tags here --%>
  <orabi:AWCommands  id="awCmd" executeWhen="manual" commandFormElementName="awCmdWin"> 
  </orabi:AWCommands>
</orabi:BIThinSession>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
      BI Beans AWCommands Tag Demo
    </title>
  </head>

  <orabi:BIBody styleClass="awstyle">
    <form name="BIForm" method="POST" action="awCommandsDemo.jsp" >
      <orabi:InitBITags parentForm="BIForm"/>
      
      <table cellspacing="2" cellpadding="3" border="0" width="100%">
        <tr>
          <td colspan="2" bgcolor="#cccccc">
            <STRONG><FONT face="Arial" size="4">AWCommands Tag Demo</FONT> </STRONG>
          </td>
        </tr>
        <tr>
          <td vAlign="middle" colspan="2" height="3">
            <hr width="100%" noshade="noshade"/>
          </td>
        </tr>
        <tr>
          <td vAlign="top" colspan="2" class="OraInstructionText" height="20">
            <ul>
              <li>The AWCommands tag allows you to execute OLAP DML commands</li>
              <li>You can configure the tag to execute commands when the page is first run, everytime the page is refreshed or via an event like in this case</li>
              <li>After executing the command the tag populates the resultValue and the errorText data objects that you can then use in your JSP page
              <li>Enter OLAP DML in the text box and then press the Execute Command button</li>
             </ul>
          </td>
        </tr>
        <tr>
          <td vAlign="middle" colspan="2" height="3">
            <hr width="100%" noshade="noshade"/>
          </td>
        </tr>
      </table>
      
      <table bgcolor="#0033ff" width="100%">
        <tr>
          <td width="100%" style="color:rgb(255,255,255); border-style:solid; border-color:rgb(255,255,255); border-width:thin;">
            <H3 style="margin-bottom:0pt"><FONT face="Arial">Command</FONT></H3>
            <table>
              <tr>
                <td>
                  &nbsp;<input name="awCmdWin" type="TEXT" size="100"/>
                </td>
              </tr>
              <tr>
                <td align="right">
                  &nbsp;<input type="button" 
                               value="Execute Command" onclick="<c:out value="${awCmd_data.execute}"/>"/>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td width="100%" style="border-color:rgb(255,255,255); border-style:solid; border-width:thin; color:rgb(255,255,255);">
            <H3 style="margin-bottom:0pt"><FONT face="Arial" color="#ffffff">Log</FONT></H3>
            <pre>
              <c:out value="${awCmd_data.resultValue}"/>      
            </pre>
          </td>
        </tr>
        <tr>
          <td width="100%" style="border-width:thin; border-style:solid; border-color:rgb(255,255,255); color:rgb(255,255,255);">
            <H3 style="margin-bottom:0pt"><FONT face="Arial" color="#ffffff">Error Text</FONT></H3>
            <pre>
              <c:out value="${awCmd_data.errorText}"/>
            </pre>
          </td>
        </tr>
      </table>
      <%-- The InsertHiddenFields tag adds state fields to the parent form tag --%>
      <orabi:InsertHiddenFields parentForm="BIForm"  biThinSessionId="bisession1" />
    </form>

  </orabi:BIBody>
</html>
<% } %>
<%-- End synchronization of the BI tags --%>
