<%-----------------------------------------------------------
   Copyright © 1999, Oracle Corporation. All rights reserved.
------------------------------------------------------------%>

<jsp:useBean id = "submitCount" class = "oracle.jsp.jml.JmlNumber" scope = "session" />

<jsp:useBean id = "bool" class = "oracle.jsp.jml.JmlBoolean" scope = "session" >
	<jsp:setProperty name = "bool" property = "value" param = "fBoolean" />
</jsp:useBean>

<jsp:useBean id = "num" class = "oracle.jsp.jml.JmlNumber" scope = "session" >
	<jsp:setProperty name = "num" property = "value" param = "fNumber" />
</jsp:useBean>

<jsp:useBean id = "fpnum" class = "oracle.jsp.jml.JmlFPNumber" scope = "session" >
	<jsp:setProperty name = "fpnum" property = "value" param = "fFPNumber" />
</jsp:useBean>

<jsp:useBean id = "str" class = "oracle.jsp.jml.JmlString" scope = "session" >
	<jsp:setProperty name = "str" property = "value" param = "fString" />
</jsp:useBean>


<HTML>

<HEAD>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
	<META NAME="GENERATOR" Content="Visual Page 1.1 for Windows">
	<TITLE>Oracle JSP Built-in Objects Sample</TITLE>
</HEAD>

<% if (submitCount.getValue() > 1) { %>
	<h3> Last submitted values </h3>
	<ul>
		<li> bool: <%= bool.getValue() %>
		<li> num: <%= num.getValue() %>
		<li> fpnum: <%= fpnum.getValue() %>
		<li> string: <%= str.getValue() %>
	</ul>
<% }

   if (submitCount.getValue() > 0) { %>

	<jsp:setProperty name = "bool" property = "value" param = "fBoolean" />
	<jsp:setProperty name = "num" property = "value" param = "fNumber" />
	<jsp:setProperty name = "fpnum" property = "value" param = "fFPNumber" />
	<jsp:setProperty name = "str" property = "value" param = "fString" />

	<h3> New submitted values </h3>
	<ul>
		<li> bool: <jsp:getProperty name="bool" property="value" />
		<li> num: <jsp:getProperty name="num" property="value" />
		<li> fpnum: <jsp:getProperty name="fpnum" property="value" />
		<li> string: <jsp:getProperty name="str" property="value" />
	</ul>
<% } %>

<jsp:setProperty name = "submitCount" property = "value" value = "<%= submitCount.getValue() + 1 %>" />
		

<FORM ACTION="index.jsp" METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">
<P> <pre>
 boolean test: <INPUT TYPE="text" NAME="fBoolean" VALUE="<%= bool.getValue() %>" >
  number test: <INPUT TYPE="text" NAME="fNumber" VALUE="<%= num.getValue() %>" >
fpnumber test: <INPUT TYPE="text" NAME="fFPNumber" VALUE="<%= fpnum.getValue() %>" >
  string test: <INPUT TYPE="text" NAME="fString" VALUE= "<%= str.getValue() %>" >
</pre>


<P> <INPUT TYPE="submit">

</FORM>


</BODY>

</HTML>
