You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/07/07 23:11:10 UTC

[jira] Created: (TAPESTRY-384) Client Side Validation inconsistent

Client Side Validation inconsistent
-----------------------------------

         Key: TAPESTRY-384
         URL: http://issues.apache.org/jira/browse/TAPESTRY-384
     Project: Tapestry
        Type: Bug
  Components: Framework  
    Versions: 4.0    
 Environment: Firefox
    Reporter: Howard M. Lewis Ship


I've been seeing problems with client side validation simply not working.

The JavaScript looks correct, but doesn't seem to execute properly:

<body>
<script language="JavaScript" type="text/javascript" src="/ww/assets/9615fca0658711a680b173eeb9f002ec/org/apache/tapestry/form/Form.js"></script>

<img src="/ww/images/fpo_navi.jpg" width="958" height="55">
<div id="ContentArea">
	<div class="measurement" align="center">
		<div id="mainContent" align="left">
			<div id="BUfrontpage1_LeftNavigation1_divLeftNavi" class="leftNavi">
			<div id="BUfrontpage1_LeftNavigation1_divHeader" class="header">
				<h2>
					Login
				</h2>
			</div>

			</div>
			<!-- place main content here -->
			<div class="mainColumn">
				
				
	
<div class="errors">
	<ul>
		<li>You must enter a value for Password.</li>
	</ul>
</div>

<form method="post" action="/ww/login/Login,form.sdirect" name="form">
<input type="hidden" name="formids" value="userId,password,login"/>
<input type="hidden" name="submitmode" value=""/>


<table>
	<tr>
		<th><label for="userId">User ID</label></th>
		<td><input type="text" name="userId" value="hlship" id="userId" size="30"/>&nbsp;<span class="required-field-marker">*</span></td>
	</tr>
	<tr>

		<th><span class="field-label-error"><label for="password">Password</label></span></th>
		<td><input type="password" name="password" value="" id="password" class="field-error" size="30"/>&nbsp;<span class="required-field-marker">*</span></td>
	</tr>
	<tr>
		<td/>
		<td>
			<input type="submit" name="login" id="login" value="Login"/>
			<button onclick="javascript:document.form.events.cancel();">Cancel</button>

		</td>
	</tr>	
</table>		

</form>
	

			</div>
			<!-- place right column content here -->
			<div class="rightColumn">
			</div>
		</div>
	</div>

</div>
<script language="JavaScript" type="text/javascript"><!--
var form_events = new FormEventManager(document.form);
document.form.events.addSubmitListener(function(event) { require(event, document.form.userId, 'You must enter a value for User ID.'); });
document.form.events.addSubmitListener(function(event) { validate_min_length(event, document.form.userId, 5, 'You must enter at least 5 characters for User ID.'); });
document.form.events.addSubmitListener(function(event) { require(event, document.form.password, 'You must enter a value for Password.'); });
document.form.events.addSubmitListener(function(event) { validate_min_length(event, document.form.password, 6, 'You must enter at least 6 characters for Password.'); });
focus(document.form.password)

// --></script></body>
</html>

On second glance; it appears that not all the necessary JavaScript files are being included into the page!  Just Form.js, but not the others.  Should see StringValidator.js in there as well as Form.js.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Assigned: (TAPESTRY-384) Client Side Validation inconsistent

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-384?page=all ]

Howard M. Lewis Ship reassigned TAPESTRY-384:
---------------------------------------------

    Assign To: Howard M. Lewis Ship

> Client Side Validation inconsistent
> -----------------------------------
>
>          Key: TAPESTRY-384
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-384
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: Firefox
>     Reporter: Howard M. Lewis Ship
>     Assignee: Howard M. Lewis Ship

>
> I've been seeing problems with client side validation simply not working.
> The JavaScript looks correct, but doesn't seem to execute properly:
> <body>
> <script language="JavaScript" type="text/javascript" src="/ww/assets/9615fca0658711a680b173eeb9f002ec/org/apache/tapestry/form/Form.js"></script>
> <img src="/ww/images/fpo_navi.jpg" width="958" height="55">
> <div id="ContentArea">
> 	<div class="measurement" align="center">
> 		<div id="mainContent" align="left">
> 			<div id="BUfrontpage1_LeftNavigation1_divLeftNavi" class="leftNavi">
> 			<div id="BUfrontpage1_LeftNavigation1_divHeader" class="header">
> 				<h2>
> 					Login
> 				</h2>
> 			</div>
> 			</div>
> 			<!-- place main content here -->
> 			<div class="mainColumn">
> 				
> 				
> 	
> <div class="errors">
> 	<ul>
> 		<li>You must enter a value for Password.</li>
> 	</ul>
> </div>
> <form method="post" action="/ww/login/Login,form.sdirect" name="form">
> <input type="hidden" name="formids" value="userId,password,login"/>
> <input type="hidden" name="submitmode" value=""/>
> <table>
> 	<tr>
> 		<th><label for="userId">User ID</label></th>
> 		<td><input type="text" name="userId" value="hlship" id="userId" size="30"/>&nbsp;<span class="required-field-marker">*</span></td>
> 	</tr>
> 	<tr>
> 		<th><span class="field-label-error"><label for="password">Password</label></span></th>
> 		<td><input type="password" name="password" value="" id="password" class="field-error" size="30"/>&nbsp;<span class="required-field-marker">*</span></td>
> 	</tr>
> 	<tr>
> 		<td/>
> 		<td>
> 			<input type="submit" name="login" id="login" value="Login"/>
> 			<button onclick="javascript:document.form.events.cancel();">Cancel</button>
> 		</td>
> 	</tr>	
> </table>		
> </form>
> 	
> 			</div>
> 			<!-- place right column content here -->
> 			<div class="rightColumn">
> 			</div>
> 		</div>
> 	</div>
> </div>
> <script language="JavaScript" type="text/javascript"><!--
> var form_events = new FormEventManager(document.form);
> document.form.events.addSubmitListener(function(event) { require(event, document.form.userId, 'You must enter a value for User ID.'); });
> document.form.events.addSubmitListener(function(event) { validate_min_length(event, document.form.userId, 5, 'You must enter at least 5 characters for User ID.'); });
> document.form.events.addSubmitListener(function(event) { require(event, document.form.password, 'You must enter a value for Password.'); });
> document.form.events.addSubmitListener(function(event) { validate_min_length(event, document.form.password, 6, 'You must enter at least 6 characters for Password.'); });
> focus(document.form.password)
> // --></script></body>
> </html>
> On second glance; it appears that not all the necessary JavaScript files are being included into the page!  Just Form.js, but not the others.  Should see StringValidator.js in there as well as Form.js.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Closed: (TAPESTRY-384) Client Side Validation inconsistent

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-384?page=all ]
     
Howard M. Lewis Ship closed TAPESTRY-384:
-----------------------------------------

    Fix Version: 4.0
     Resolution: Fixed

> Client Side Validation inconsistent
> -----------------------------------
>
>          Key: TAPESTRY-384
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-384
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: Firefox
>     Reporter: Howard M. Lewis Ship
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0

>
> I've been seeing problems with client side validation simply not working.
> The JavaScript looks correct, but doesn't seem to execute properly:
> <body>
> <script language="JavaScript" type="text/javascript" src="/ww/assets/9615fca0658711a680b173eeb9f002ec/org/apache/tapestry/form/Form.js"></script>
> <img src="/ww/images/fpo_navi.jpg" width="958" height="55">
> <div id="ContentArea">
> 	<div class="measurement" align="center">
> 		<div id="mainContent" align="left">
> 			<div id="BUfrontpage1_LeftNavigation1_divLeftNavi" class="leftNavi">
> 			<div id="BUfrontpage1_LeftNavigation1_divHeader" class="header">
> 				<h2>
> 					Login
> 				</h2>
> 			</div>
> 			</div>
> 			<!-- place main content here -->
> 			<div class="mainColumn">
> 				
> 				
> 	
> <div class="errors">
> 	<ul>
> 		<li>You must enter a value for Password.</li>
> 	</ul>
> </div>
> <form method="post" action="/ww/login/Login,form.sdirect" name="form">
> <input type="hidden" name="formids" value="userId,password,login"/>
> <input type="hidden" name="submitmode" value=""/>
> <table>
> 	<tr>
> 		<th><label for="userId">User ID</label></th>
> 		<td><input type="text" name="userId" value="hlship" id="userId" size="30"/>&nbsp;<span class="required-field-marker">*</span></td>
> 	</tr>
> 	<tr>
> 		<th><span class="field-label-error"><label for="password">Password</label></span></th>
> 		<td><input type="password" name="password" value="" id="password" class="field-error" size="30"/>&nbsp;<span class="required-field-marker">*</span></td>
> 	</tr>
> 	<tr>
> 		<td/>
> 		<td>
> 			<input type="submit" name="login" id="login" value="Login"/>
> 			<button onclick="javascript:document.form.events.cancel();">Cancel</button>
> 		</td>
> 	</tr>	
> </table>		
> </form>
> 	
> 			</div>
> 			<!-- place right column content here -->
> 			<div class="rightColumn">
> 			</div>
> 		</div>
> 	</div>
> </div>
> <script language="JavaScript" type="text/javascript"><!--
> var form_events = new FormEventManager(document.form);
> document.form.events.addSubmitListener(function(event) { require(event, document.form.userId, 'You must enter a value for User ID.'); });
> document.form.events.addSubmitListener(function(event) { validate_min_length(event, document.form.userId, 5, 'You must enter at least 5 characters for User ID.'); });
> document.form.events.addSubmitListener(function(event) { require(event, document.form.password, 'You must enter a value for Password.'); });
> document.form.events.addSubmitListener(function(event) { validate_min_length(event, document.form.password, 6, 'You must enter at least 6 characters for Password.'); });
> focus(document.form.password)
> // --></script></body>
> </html>
> On second glance; it appears that not all the necessary JavaScript files are being included into the page!  Just Form.js, but not the others.  Should see StringValidator.js in there as well as Form.js.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org