Thank you. -----Original Message----- From: KOZLOV Roman [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 14. Mai 2002 16:26 To: [EMAIL PROTECTED] Subject: Re: xsp-formval:is-toosmall causes xsp compilation error
Hi Volker, Perhaps you have to enclose your xsp:page content in some intermediate tag. Otherwise the "if" is out of any method. Roman Volker Schneider wrote: > Dear colleagues, > > if have this xsp file, in order to show the form validation error but I > stuck there for hours: > > <?xml version="1.0" encoding="iso-8859-1"?> > > <xsp:page xmlns:xsp="http://apache.org/xsp" > xmlns:xsp-formval="http://apache.org/xsp/form-validator/2.0"> > > <xsp:logic> > String theErrorMessage = "No error message specified."; > > if (<xsp-formval:is-toosmall name="startzip"/>) > { > }; > > </xsp:logic> > > <message> > FormValidationError: <xsp:expr>theErrorMessage</xsp:expr> > </message> > > </xsp:page> > > And I got this error message: > > description org.apache.cocoon.ProcessingException: Language Exception: > org.apache.cocoon.components.language.LanguageException: Error compiling > ErrorFormVal_xsp: Line 68, column 2: illegal start of type Line 0, column 0: > 1 error > > The java file looks like (whereby Line 68 is where the 'if' statement > begins): > > public class ErrorFormVal_xsp extends XSPGenerator { > > static { > dateCreated = 1021380103370L; > dependencies = new File[] { > > }; > } > > /* Built-in parameters available for use */ > // context - ServletContext > // request - org.apache.cocoon.environment.Request > // response - org.apache.cocoon.environment.Response > // parameters - parameters defined in the sitemap > > /* User Class Declarations */ > > String theErrorMessage = "No error message specified."; > > if ( > > (XSPFormValidatorHelper.getParamResult(objectModel,"startzip").equals(Valida > torActionResult.TOOSMALL)) > ) > { > }; > > /** > * Generate XML data. > */ > public void generate() throws SAXException, IOException, > ProcessingException { > > ... > > I have no idea what went wrong, because I took the syntax from > documentation. > > Who can help? > > Thank you, best regards > - Volker - > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>