You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2005/02/17 09:07:01 UTC
Re: Processing a form's multi-select data with flow and
JXTemplate
Gioni
There are a number of reasons I do not use a CForm
for this project (yes, I do know how to use them!).
If getParameter does NOT return an array or a list of values
then which function should I be using?
Thanks
Derek
>>> g.gennai@cbim.it 2005/02/17 09:55:53 AM >>>
Derek Hohls wrote:
>I have a (ordinary) form with multi-select field. The form's
>data is then intercepted by a flow routine, and must then be
>processed by a JXTemplate page.
>
>In the form:
>
><select multiple="multiple" size="5" name="Year_pd">
>
>
Multiple is a boolean value
<select multiple size="5" name="Year_pd">
>In the flow page:
>
>var Year_pd = cocoon.request.getParameter("Year_pd");
>
>
Are you sure that getParameter return an array or a list of value, try
print(Year_pd); to see the type.
Why don't you use a cocoon cform?
With cform is quite simple,
in definition file
<fd:multivaluefield id="year_pd">
<fd:label>Year</fd:label>
<fd:datatype base="integer"/>
<fd:validation>
<fd:value-count min="1"/>
</fd:validation>
<fd:selection-list>
<fd:item/>
</fd:selection-list>
</fd:multivaluefield>
in flowscript
var Year_pd = form.lookupWidget("year_pd").value;
this return an array of value
I hope this can help you
Bye Gioni
---------------------------------------------------------------------
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
Re: Processing a form's multi-select data with flow and JXTemplate
Posted by gioni <g....@cbim.it>.
Derek Hohls wrote:
>Gioni
>
>If getParameter does NOT return an array or a list of values
>then which function should I be using?
>
>
Can you tell me the result of print(Year_pd)?
Gioni
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Processing a form's multi-select data with flow and JXTemplate
Posted by gioni <g....@cbim.it>.
Derek Hohls wrote:
>Gioni
>
>There are a number of reasons I do not use a CForm
>for this project (yes, I do know how to use them!).
>
>If getParameter does NOT return an array or a list of values
>then which function should I be using?
>
>
>
getParameterValues(), this method return a list of string
Bye Gioni
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org