cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14739] New: - The SimpleFormTransformer component fails to close a <textarea> tag if validation fails.
Date Thu, 21 Nov 2002 15:20:28 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14739>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14739

The SimpleFormTransformer component fails to close a <textarea> tag if validation fails.

           Summary: The SimpleFormTransformer component fails to close a
                    <textarea> tag if validation fails.
           Product: Cocoon 2
           Version: 2.0.3
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: sitemap components
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: paul@codenosis.com


Overview Description: 
When a FormValidationAction fails to validate forms fields and 
returns back to the form via the SimpleFormTransformer, which in turn repopulates the form

values. The Transformer fails to close the <textarea> tag after the value.  This results
in Cocoon 
reporting badly formed XML.

Steps to Reproduce: 

1) Create a HTML form e.g. 
test.html

<html>
    <head><title>test page</title></head>
    <body>
    <form 
method="post" action="test.html">
      <table border="1">
        <tr>
          <td>Description:</td>
          
<td><textarea name="test-desc"></textarea></td>
        </tr>
        <tr>
          <td colspan="2">
            
<input value="add" name="cocoon-action-add" type="submit">
          </td>
        </tr>
      </table>
    
</form>
    </body>
</html>

2. create a descriptor file for the 
FormActionValidator

descriptor.xml
<?xml version="1.0"?>
<root>
    <parameter 
name="test-desc" type="string" nullable="no"/>
    <constraint-set name="test-
constraint">
        <validate name="test-desc max-len="15" min-len="5"/>
    </constraint-
set>
</root>

3. create the sitemap section
<map:action-sets>
    <map:action-set 
name="test_actions">
       <map:act type="form-validator" action="add"/>
    </map:action-
set>
</map:action-sets>

<map:pipeline>
    <map:match pattern="test.html">
        
<map:act set="test_actions">
            <map:parameter name="descriptor" 
value="descriptor.xml"/>
            <map:parameter name="validate-set" value="test-
constraint"/>
        </map:act>
        <map:generate type="html" src="{0}"/>
        <map:transform 
type="simple-form"/>
        <map:serialize type="html"/>
    
</map:match>
</map:pipeline>

     
Actual Results: 

The <textarea> does not have a 
close tag after the value.

<html>
   <head><title>test page</title></head>
   <body>
       
<form method="post" action="test.html">
           <table border="1">
           <tr>
              
<td>Description:</td>
              <td><textarea name="test-desc">edfdf</td> <!--ERROR HERE
-->
           
</tr>
           <tr>
              <td colspan="2">
                 <input value="add" name="cocoon-action-add" 
type="submit">
              </td>
            </tr>
           </table>
        </form>
     </body>
 </html>                            


Expected 
Results: <td><textarea name="test-desc">edfdf</textarea>/td> 


Build Date & Platform: 
Date and platform of the build that you first encountered the bug in. 

Sun Cobalt Redhat linux 
6.2
Tomcat 4.1.10
JDK 1.4
Cocoon 2 v2.0.3 branch
Using the Java XML summer pack-02
{
    
xalan-2.3.1
    xerces-2
}

Additional Builds and Platforms: Unknown

Additional 
Information: Any other debugging information.
No.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message