
// Copyright (c) 1999, 2000 Oracle Corporation
package oracle.jbo.html.jsp.datatags;

import javax.servlet.jsp.tagext.*;

/**
 * A Class class.
 * <P>
 * @author Juan Oropeza
 */
public class RowTagTEI extends TagExtraInfo {

   /**
    * Constructor
    */
   public RowTagTEI() {
   }

   /**
  * information on scripting variables defined by this tag
  *
  * @param data The translation-time TagData instance.
  */
  public VariableInfo[] getVariableInfo(TagData data)
  {
    return new VariableInfo[]
    {
      new VariableInfo(data.getAttributeString("id"), "oracle.jbo.Row", true, VariableInfo.AT_BEGIN)
    };
  }

   /**
    * isValid
    * @param p0
    * @return boolean
    */
   public boolean isValid(TagData data)
   {
      String sAction = data.getAttributeString("action");

      if(sAction.equalsIgnoreCase("Find") ||
         sAction.equalsIgnoreCase("Insert") ||
         sAction.equalsIgnoreCase("Create") ||
         sAction.equalsIgnoreCase("Update") ||
         sAction.equalsIgnoreCase("Delete") ||
         sAction.equalsIgnoreCase("Current") ||
         sAction.equalsIgnoreCase("Lock"))
         {
            return super.isValid(data);
         }
         else
         {
            return false;
         }
   }
}

