/********************************************************************
 *  Oracle JDeveloper
 *  Copyright (c) 1997, 1999, Oracle Corporation. All rights reserved.
 ********************************************************************/

package oracle.jdeveloper.html;

import oracle.jdeveloper.html.*;
import oracle.jbo.*;

/**
 *
 *	Represents a hidden form field renderer.
 *
 * @author  Juan Oropeza
 * @version PUBLIC
 *
 **/
 
public class HiddenField extends HTMLFieldRendererImpl
{
  public HiddenField()
  {
  }

  public String renderToString(HTMLRenderingContext ctx , RowSet rs, Row row , String sAttribute)
   {
      String sText;

      Object obj = row.getAttribute(sAttribute);

      if(obj == null)
      {
         sValue = "&nbsp";
      }
      else
      {
          sValue = obj.toString();
      }

      // also add the hidden field for use in comparisons
      sText = "<INPUT TYPE=\"HIDDEN\" NAME=\"" + sAttribute + "\" VALUE=\"" + sValue + "\" />";

      return sText;
   }

}

 