Bug 15247

Summary: text field default value always generated
Product: Taglibs Reporter: Frank Miceli <micelif>
Component: Input TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P3    
Version: 1.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Frank Miceli 2002-12-10 19:42:17 UTC
The text tag:
<input:text name="text" default="default text" bean="myBean" /> 

always generates the default text, even when a value is present in the value 
bean:

<input type="text" name="text" value="text from bean" value="default text" />

The default value should be suppressed when the field has data.
Comment 1 Karl von Randow 2002-12-10 20:09:46 UTC
Good spotting, that's fixed and committed to CVS - so should be available for 
download after the nightly build.

The bug affected the Text, Password and TextArea tags.
Comment 2 The Bugmanager 2004-02-13 14:26:49 UTC
I am finding the same problem. I download the lastest version from nightly
builds but the problem continues.
Here is my code:

<jsp:useBean id="user" class="the.complete.class.Name"/>
...
<input:form bean="user" action="/action" method="post">
...
   <input:text name="name" default="Type the user name"/>
...
</input:form>
Comment 3 Karl von Randow 2004-10-26 23:05:12 UTC
I can't reproduce this bug in the latest copy of the input taglib. Perhaps 
this was a problem related to the lack of a release() method previously. 
Please download the latest input taglib and try again.

If the problem is reproduced, please submit the generated HTML as well.