You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by steeven <st...@dealeasy.com> on 2002/06/14 05:26:20 UTC

Form validator error in logicsheet

My form validator code worked well under xsp file. when i moved them to logicshee, and error raised. It was reported that ths generated java file is wrong.
Is it a bug?

============= guestbook-logic.xsl ==============
<xsl:template match="guestbook:check-form">
	Error: <xsp-formval:results/><br/>
	<xsp-formval:descriptor name="context:///test/descriptor.xml" constraint-set="guestbook">
		age must not less than
		<xsp-formval:get-attribute parameter="age" name="min"/>
		<br/>
	    	<xsp-formval:on-null name="age">
	    		null age
	    	</xsp-formval:on-null>
	</xsp-formval:descriptor>
</xsl:template>
==========================================

here is the generated xsp file:
=============guestbook_xsp.java===========
    
          if (XSPFormValidatorHelper.getParamResult(objectModel,"age").equals(ValidatorActionResult.ISNULL)) {
              
	    		null age
	    	
          }
        
      }
=======================================

===========error reported on browser====
Line 409, column 32:  ';' expected
Line 409, column 24:  class null not found in class org.apache.cocoon.www.file
========================================

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Form validator error in logicsheet

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 14.Jun.2002 -- 11:26 AM, steeven wrote:
> My form validator code worked well under xsp file. when i moved them to logicshee, and error raised. It was reported that ths generated java file is wrong.

I wonder how it worked on your XSP. Problem is, that the on-XXX tags
don't switch to xsp:content for the nested block. So you need to
enlose your error message with markup, e.g. "<b>null age</b>"

I agree that it would be better if xsp:content would be assumed for
the nested block but I wouldn't call it a bug.

> Is it a bug?
> 
> ============= guestbook-logic.xsl ==============
> <xsl:template match="guestbook:check-form">
> 	Error: <xsp-formval:results/><br/>
> 	<xsp-formval:descriptor name="context:///test/descriptor.xml" constraint-set="guestbook">
> 		age must not less than
> 		<xsp-formval:get-attribute parameter="age" name="min"/>
> 		<br/>
> 	    	<xsp-formval:on-null name="age">
> 	    		null age
> 	    	</xsp-formval:on-null>
> 	</xsp-formval:descriptor>
> </xsl:template>
> ==========================================
> 
> here is the generated xsp file:
> =============guestbook_xsp.java===========
>     
>           if (XSPFormValidatorHelper.getParamResult(objectModel,"age").equals(ValidatorActionResult.ISNULL)) {
>               
> 	    		null age
> 	    	
>           }
>         
>       }
> =======================================

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>