cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: Flow->Woody->Event->Woody... possible?
Date Thu, 22 Apr 2004 03:22:11 GMT
Never create continuations in an event handler. If you do the 
continuation stack is only that of the event handler and the original 
script will _not_ resume when the event handler completes. In other 
words the call stack looks like this

Java (FlowInterpreter.callFunction("myFunction")) => JS (myFunction())  
=> JS (form.showForm())  => Java (Form.process()) => JS (event handler code)

JavaScript continuations are not preserved when there are callbacks to 
Java (as in Form.process()).

Regards,

Chris

Marc Portier wrote:

>
>
> Joerg Heinicke wrote:
>
>> On 20.04.2004 09:44, Steve Steinitz wrote:
>>
>>> We couldn't find that example but here is what we've done:
>>>
>>>     <fd:submit id="remove" action-command="remove" >
>>>        <fd:label>Remove</fd:label>
>>>     </fd:submit>
>>>     and in our xsp
>>>
>>>     <wt:widget id="remove"/>
>>>
>>> and in the flow
>>>
>>>     if ("remove".equals(form.submitId))     {
>>>         ...
>>>     }
>>>
>>> This condition was never true so I logged the value of
>>> form.submitid -- it was 'undefined'.
>>>
>>> Is there anything else we need to do?
>>
>>
>>
>> I had the same problem yesterday too:
>> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108238973125352&w=4
>> and fixed it by changing the order of the form widgets in the 
>> definition.
>>
>> Furthermore my form.submitId was also null at the end, while 
>> form.getSubmitWidget().getId() returned the correct value.
>>
>> Does this help?
>>
>
> they still would be faced with the fact that their event-handling 
> tries to show another form (see the original message, your case was 
> about validation, theirs is about event-handling that wants to call 
> showForm)
>
> I haven't tried it, but that's mainly cause I would never do that: 
> IMHO it's not your form's event but the flow that should decide on 
> next forms to show
>
> I really don't know what the event-call on the continuations stack 
> will do if you call showForm from inside the event-handling?
> If someone does, I'm quite interested to hear about it.
>
> regards,
> -marc=
>
>> Joerg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>


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


Mime
View raw message