cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Schneider" <volker.schnei...@danet.de>
Subject RE: xsp-formval:is-toosmall causes xsp compilation error
Date Tue, 14 May 2002 14:25:04 GMT
Thank you.

-----Original Message-----
From: KOZLOV Roman [mailto:r-kozlov@opencascade.com]
Sent: Dienstag, 14. Mai 2002 16:26
To: cocoon-users@xml.apache.org
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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message