wood burning stoves 2.0*
The moose likes Struts and the fly likes error in form display? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "error in form display?" Watch "error in form display?" New topic
Author

error in form display?

shahidrasul shahid
Ranch Hand

Joined: Jan 28, 2008
Posts: 62
this is my form code but it does not display completely. some time its submit button disappeared and sometime some other thing disappeared?


<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title><bean:message key="addAccountForm.title"/></title>
</head>
<body>
<h1 align="center"><bean:message key="addAccountForm.title"/></h1>
<center>
<html:errors/>
<table border="1" align="center ">
<html:form action="Account_1.do" method="POST" onsubmit="return validateAccount(this);">
<h2 align="left">Customer Personal Information</h2>
<tr>
<td><bean:message key="addAccountForm.firstName"/></td>
<td><html:text property="firstName" size="40" maxlength="20"/></td>
</tr>
<tr>
<td><bean:message key="addAccountForm.lastName"/></td>
<td><html:text property="lastName" size="40" maxlength="20"/></td>
</tr>
<tr>
<td><bean:message key="addAccountForm.nid"/></td>
<td><html:text property="nid" size="40" maxlength="15"/></td>
</tr>
<tr>
<td colspan="2" align="center"><b>Permanent Address</b></td>
</tr>

<tr>
<td><bean:message key="addAccountForm.permanentHouseNo"/></td>
<td><html:text property="permanentHouseNo" size="40" maxlength="20"/></td>
</tr>
<tr>
<td><bean:message key="addAccountForm.permanentCity"/></td>
<td><html:text property="permanentCity" size="40" maxlength="15"/></td>
</tr>
<tr>
<td><bean:message key="addAccountForm.permanentState"/></td>
<td><html:text property="permanentState" size="40" maxlength="15"/></td>
</tr>
<tr>
<td colspan="2" align="center"><b>Temporary Address</b></td>
</tr>

<tr>
<td><bean:message key="addAccountForm.temporaryHouseNo"/></td>
<td><html:text property="temporaryHouseNo" size="40" maxlength="15"/></td>
</tr>
<tr>
<td><bean:message key="addAccountForm.temporaryCity"/></td>
<td><html:text property="temporaryCity" size="40" maxlength="15"/></td>
</tr>
<tr>
<td><bean:message key="addAccountForm.temporaryState"/></td>
<td><html:text property="temporaryState" size="40" maxlength="15"/></td>
</tr>
<tr>
<td colspan="2" align="center"><br></td>
</tr>

<tr>
<td><bean:message key="addAccountForm.cellNumber"/></td>
<td><html:text property="cellNumber" size="40" maxlength="11"/></td>
</tr>
<tr>
<td><bean:message key="addAccountForm.landNumber"/></td>
<td><html:text property="landNumber" size="40" maxlength="11"/></td>
</tr>

<tr>
<td><bean:message key="addAccountForm.email"/></td>
<td><html:text property="email" size="40" maxlength="25"/></td>
</tr>
<tr>
<td><bean:message key="addAccountForm.dob"/></td>
<td>
<bean:message key="addAccountForm.day"/>
<html:select property="birth_Day">
<option> </option>
<c:forEach var="i" begin="1" end="31" step="1">
<option value="${i}"><c ut value="${i}"/></option>
</c:forEach>
</html:select>

<bean:message key="addAccountForm.month"/>
<html:select property="birth_Month">
<option> </option>
<option value="January">January</option>
<option value="Feburay">Feburay</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="Octomber">Octomber</option>
<option value="November">November</option>
<option value="December">December</option>
</html:select>
<bean:message key="addAccountForm.year"/>
<html:select property="birth_Year">
<option> </option>
<c:forEach var="i" begin="1923" end="1990" step="1">
<option value="${i}"><c ut value="${i}"/></option>
</c:forEach>
</html:select>
</td>
</tr>
<tr>
<td colspan="2">
<html:submit/>
</td>
</tr>
</html:form>
<html:javascript formName="account"/>
</table>
</center>
</body>
</html>
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm not sure if this will solve your problem, but You should be using <htmlption> tags inside <html:select> tags, rather than <option> tags.
[ May 21, 2008: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in form display?
 
Similar Threads
Getting an Exception
Problem with JSP form
Problem with JSP form
html:errors
using Multiple submit buttons.