You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Suzan Foster <su...@nerocmediaware.nl> on 2005/03/29 15:17:39 UTC

continuations: is this valid?

Can i write the following in a sitemap, and will it do what i expect?

<map:match pattern="*/*.cont">
    <map:call continuation="{2}">
       <map:param name="form" value="{1}"/>
    </map:call>
</map:match>

I basically want to stay in the flow whilst using multiple forms which 
return to a parent form after they have been submitted.

Regards,
Suzan Foster.

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


Re: continuations: is this valid?

Posted by Upayavira <uv...@upaya.co.uk>.
Suzan Foster wrote:
> Upayavira wrote:
> 
>> Suzan Foster wrote:
>>  
>>
>>> Can i write the following in a sitemap, and will it do what i expect?
>>>
>>> <map:match pattern="*/*.cont">
>>>   <map:call continuation="{2}">
>>>      <map:param name="form" value="{1}"/>
>>>   </map:call>
>>> </map:match>
>>>
>>> I basically want to stay in the flow whilst using multiple forms 
>>> which return to a parent form after they have been submitted.
>>>   
>>
>>
>> I've never seen a continutation being passed a parameter, so I don't 
>> know where/how you'd get at that form parameter. However, do you 
>> really need it? You really only need one matcher for continuations per 
>> sitemap, regardless of how many forms you have. The continuation ID 
>> takes you back into the relevant flowscript. Anything else I wanted to 
>> pass back, I'd pass in as a request parameter or form field and get at 
>> it from within my flowscript that way
>>  
>>
> 
> I don't want to use request parameters as i will be using xforms and 
> posting xml. In the flow i want to do something resembling the following:
> 
> function showForm(form)
> {
>  bool active = true;
>  while (active)
>  {
>    ...
>    sendPageAndWait(...);
>    ...
>    if (cocoon.parameters.form!=thisform}
>    {
>       showForm(cocoon.parameters.form);
>    }
>    ...
>  }
> }

Well, have you tried it? Does it work?

Regards, Upayavira

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


Re: continuations: is this valid?

Posted by Suzan Foster <su...@nerocmediaware.nl>.
Upayavira wrote:

>Suzan Foster wrote:
>  
>
>>Can i write the following in a sitemap, and will it do what i expect?
>>
>><map:match pattern="*/*.cont">
>>   <map:call continuation="{2}">
>>      <map:param name="form" value="{1}"/>
>>   </map:call>
>></map:match>
>>
>>I basically want to stay in the flow whilst using multiple forms which 
>>return to a parent form after they have been submitted.
>>    
>>
>
>I've never seen a continutation being passed a parameter, so I don't 
>know where/how you'd get at that form parameter. However, do you really 
>need it? You really only need one matcher for continuations per sitemap, 
>regardless of how many forms you have. The continuation ID takes you 
>back into the relevant flowscript. Anything else I wanted to pass back, 
>I'd pass in as a request parameter or form field and get at it from 
>within my flowscript that way
>  
>

I don't want to use request parameters as i will be using xforms and 
posting xml. In the flow i want to do something resembling the following:

function showForm(form)
{
  bool active = true;
  while (active)
  {
    ...
    sendPageAndWait(...);
    ...
    if (cocoon.parameters.form!=thisform}
    {
       showForm(cocoon.parameters.form);
    }
    ...
  }
}

Regards,
Suzan Foster.

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


Re: continuations: is this valid?

Posted by Upayavira <uv...@upaya.co.uk>.
Suzan Foster wrote:
> Can i write the following in a sitemap, and will it do what i expect?
> 
> <map:match pattern="*/*.cont">
>    <map:call continuation="{2}">
>       <map:param name="form" value="{1}"/>
>    </map:call>
> </map:match>
> 
> I basically want to stay in the flow whilst using multiple forms which 
> return to a parent form after they have been submitted.

I've never seen a continutation being passed a parameter, so I don't 
know where/how you'd get at that form parameter. However, do you really 
need it? You really only need one matcher for continuations per sitemap, 
regardless of how many forms you have. The continuation ID takes you 
back into the relevant flowscript. Anything else I wanted to pass back, 
I'd pass in as a request parameter or form field and get at it from 
within my flowscript that way.

Regards, Upayavira

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


Re: continuations: is this valid?

Posted by Mark Leicester <ma...@efurbishment.com>.
Hi Suzan,

I have done something similar in the past, and it worked for me. I was
able to access the parameter in the flowscript using:
form = cocoon.parameters["form"];

Cheers,
Mark

> Can i write the following in a sitemap, and will it do what i expect?
>
> <map:match pattern="*/*.cont">
>     <map:call continuation="{2}">
>        <map:param name="form" value="{1}"/>
>     </map:call>
> </map:match>
>
> I basically want to stay in the flow whilst using multiple forms which
> return to a parent form after they have been submitted.
>
> Regards,
> Suzan Foster.
>
> ---------------------------------------------------------------------
> 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