You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carlos Chávez <cc...@agssa.net> on 2003/10/02 03:03:40 UTC

woody block: assert validation not work

  Hello all,

  i am need write the expression: tasa_tasacambio > 0.0000 in the assert
  validation, the data definition file is:

      <wd:field id="tasa_tasacambio" required="true">
        <wd:label>Tasa:</wd:label>
        <wd:datatype base="decimal">
            <wd:convertor variant="number">
                <wd:patterns>
                    <wd:pattern>#.0000</wd:pattern>
                </wd:patterns>
            </wd:convertor>
            <wd:validation>
                <wd:assert test="tasa_tasacambio &gt; 0.0000"/>
            </wd:validation>
        </wd:datatype>
    </wd:field>

   the validation of the field empty work fine, but when is execute
   the assert validation send the next message:

An Error Occurred

"resource://org/apache/cocoon/woody/flow/javascript/woody2.js", line 148:
uncaught JavaScript exception: at tasacambioform
(file:/home/desarrollo/tomcat/webapps/sga/docs/tasacambio/tasacambio.js,
Line 4) at (resource://org/apache/cocoon/woody/flow/javascript/woody2.js,
Line 148): java.lang.StackOverflowError

org.apache.avalon.framework.CascadingRuntimeException:
"resource://org/apache/cocoon/woody/flow/javascript/woody2.js", line 148:
uncaught JavaScript exception: at tasacambioform
(file:/home/desarrollo/tomcat/webapps/sga/docs/tasacambio/tasacambio.js,
Line 4) at (resource://org/apache/cocoon/woody/flow/javascript/woody2.js,
Line 148): java.lang.StackOverflowError

cause: java.lang.StackOverflowError

full exception chain stacktrace[show]


   i'am try to see the example of registration form of woody but
   this not work too when the assert validation of confirmPassword field
   is execute, the examplo present the empty page after thes execute.

   what is wrong?

  i'am use cocoon version: 2.1.3-dev CVS

-- 
Carlos Chávez
AG Software, S.A.
776-8344
267-3007



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


Re: woody block: assert validation not work

Posted by Bruno Dumon <br...@outerthought.org>.
Carlos & Antonio,

the problem with the endless loop in the validation is now fixed. The
solution was very simple, Sylvain pointed it out to me.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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


Re: woody block: assert validation not work

Posted by Carlos Chávez <cc...@agssa.net>.
Antonio Gallardo Escribio :-)
> Bruno Dumon dijo:
>> On Thu, 2003-10-02 at 11:47, Antonio Gallardo wrote:
>>> Bruno Dumon dijo:
>>> > However, for what you are trying to do here, I'd suggest using the
>>> "range" validation rule.
>>>
>>> Hi Bruno:
>>>
>>> Carlos and I work together.
>>
>> I suspected something like this ;-)
>>
>> Welcome on board, Carlos!

   thanks Bruno.

>>
>>>  This is his first post to the list, but he is
>>> working with Cocoon 3 or 4 months. We are aware that range is better
>>> for that purpose, but this is just a test.

   i'm think maybe we need when test two field in the form.

>>
>> Yes of course, I also wanted to know what's wrong.
>>
>>>  Carlos helps me in the integer
>>> datatype I posted yesterday.
>>>
>>> Interesting enough is that the assert validator in woody is not
>>> working for us. I think  maybe it is broken.
>>
>> Now that I think of it, this probably has to do with Sylvain's change
>> of doing the validation as part of the getValue() call, which is also
>> done in the validation rule itself to retrieve the value of the
>> widget, so it's going to do that recursively and finally give a
>> StackOverflowError. The same can also occur if two different widgets
>> reference each other in their validation rules. We'll have to see what
>> to do about this, but I don't have time right now to think about it.
>
> yep. StackOverflow is the error in the sample of registration form of
> woody block demo. The error show the recursion you said!
>
> Well, maybe you can do "tele-programming" (or e-programming) like
> before, just send us some tips and we will be glad to fix the bug ;)
>
> BTW, Cocoon 2.1.2 has the bug inside! opss! :-( I hope Carsten will not
> be angered if we request for 2.1.3 :-D
>
> Best Regards,
>
> Antonio Gallardo
>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


-- 
Carlos Chávez
AG Software, S.A.
776-8344
267-3007



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


Re: woody block: assert validation not work

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Bruno Dumon dijo:
> On Thu, 2003-10-02 at 11:47, Antonio Gallardo wrote:
>> Bruno Dumon dijo:
>> > However, for what you are trying to do here, I'd suggest using the
>> "range" validation rule.
>>
>> Hi Bruno:
>>
>> Carlos and I work together.
>
> I suspected something like this ;-)
>
> Welcome on board, Carlos!
>
>>  This is his first post to the list, but he is
>> working with Cocoon 3 or 4 months. We are aware that range is better
>> for that purpose, but this is just a test.
>
> Yes of course, I also wanted to know what's wrong.
>
>>  Carlos helps me in the integer
>> datatype I posted yesterday.
>>
>> Interesting enough is that the assert validator in woody is not
>> working for us. I think  maybe it is broken.
>
> Now that I think of it, this probably has to do with Sylvain's change of
> doing the validation as part of the getValue() call, which is also done
> in the validation rule itself to retrieve the value of the widget, so
> it's going to do that recursively and finally give a StackOverflowError.
> The same can also occur if two different widgets reference each other in
> their validation rules. We'll have to see what to do about this, but I
> don't have time right now to think about it.

yep. StackOverflow is the error in the sample of registration form of
woody block demo. The error show the recursion you said!

Well, maybe you can do "tele-programming" (or e-programming) like before,
just send us some tips and we will be glad to fix the bug ;)

BTW, Cocoon 2.1.2 has the bug inside! opss! :-( I hope Carsten will not be
angered if we request for 2.1.3 :-D

Best Regards,

Antonio Gallardo



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


Re: woody block: assert validation not work

Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2003-10-02 at 11:47, Antonio Gallardo wrote:
> Bruno Dumon dijo:
> > However, for what you are trying to do here, I'd suggest using the
> > "range" validation rule.
> 
> Hi Bruno:
> 
> Carlos and I work together.

I suspected something like this ;-)

Welcome on board, Carlos!

>  This is his first post to the list, but he is
> working with Cocoon 3 or 4 months. We are aware that range is better for
> that purpose, but this is just a test.

Yes of course, I also wanted to know what's wrong.

>  Carlos helps me in the integer
> datatype I posted yesterday.
> 
> Interesting enough is that the assert validator in woody is not working
> for us. I think  maybe it is broken.

Now that I think of it, this probably has to do with Sylvain's change of
doing the validation as part of the getValue() call, which is also done
in the validation rule itself to retrieve the value of the widget, so
it's going to do that recursively and finally give a StackOverflowError.
The same can also occur if two different widgets reference each other in
their validation rules. We'll have to see what to do about this, but I
don't have time right now to think about it.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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


Re: woody block: assert validation not work

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Bruno Dumon dijo:
> However, for what you are trying to do here, I'd suggest using the
> "range" validation rule.

Hi Bruno:

Carlos and I work together. This is his first post to the list, but he is
working with Cocoon 3 or 4 months. We are aware that range is better for
that purpose, but this is just a test. Carlos helps me in the integer
datatype I posted yesterday.

Interesting enough is that the assert validator in woody is not working
for us. I think  maybe it is broken.

Please try it. :)

Best Regards,

Antonio Gallardo



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


Re: woody block: assert validation not work

Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2003-10-02 at 03:03, Carlos Chávez wrote:
>   Hello all,
> 
>   i am need write the expression: tasa_tasacambio > 0.0000 in the assert
>   validation, the data definition file is:
> 
>       <wd:field id="tasa_tasacambio" required="true">
>         <wd:label>Tasa:</wd:label>
>         <wd:datatype base="decimal">
>             <wd:convertor variant="number">
>                 <wd:patterns>
>                     <wd:pattern>#.0000</wd:pattern>
>                 </wd:patterns>
>             </wd:convertor>
>             <wd:validation>
>                 <wd:assert test="tasa_tasacambio &gt; 0.0000"/>
>             </wd:validation>
>         </wd:datatype>
>     </wd:field>
> 
>    the validation of the field empty work fine, but when is execute
>    the assert validation send the next message:
> 
> An Error Occurred
> 
> "resource://org/apache/cocoon/woody/flow/javascript/woody2.js", line 148:
> uncaught JavaScript exception: at tasacambioform
> (file:/home/desarrollo/tomcat/webapps/sga/docs/tasacambio/tasacambio.js,
> Line 4) at (resource://org/apache/cocoon/woody/flow/javascript/woody2.js,
> Line 148): java.lang.StackOverflowError
> 
> org.apache.avalon.framework.CascadingRuntimeException:
> "resource://org/apache/cocoon/woody/flow/javascript/woody2.js", line 148:
> uncaught JavaScript exception: at tasacambioform
> (file:/home/desarrollo/tomcat/webapps/sga/docs/tasacambio/tasacambio.js,
> Line 4) at (resource://org/apache/cocoon/woody/flow/javascript/woody2.js,
> Line 148): java.lang.StackOverflowError
> 
> cause: java.lang.StackOverflowError
> 
> full exception chain stacktrace[show]
> 
> 
>    i'am try to see the example of registration form of woody but
>    this not work too when the assert validation of confirmPassword field
>    is execute, the examplo present the empty page after thes execute.
> 
>    what is wrong?

I'd need to see the full stacktrace for this.

However, for what you are trying to do here, I'd suggest using the
"range" validation rule.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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