Hi
,
I am trying to read
values from a multivaluefield (multi select combo box) from a cocoon form and
use cocoon form binding to extract the values.
My intent is to
create an xml file from the data that has been selected in the
form.
I have tried all
variation of cocoon form binding to get the data , but not able to do
so.
I am able to
successfully read the value of a single select drop down box, by using "
<value id="searchFields" path="@searchFields" />" , but not able to get
values for multi select combo box.
I have
tried the following:
1. ) I have tried
using repeaters but that give a class cast exception. at form.save
method
<?xml
version="1.0" encoding="utf-8"?>
<context
path="/content" xmlns="http://apache.org/cocoon/forms/1.0#binding">
<repeater id="searchFields" parent-path="." row-path="searchFields">
<identity>
<value id="name" path="@id" />
</identity>
<on-bind>
<value id="name" path="@id" />
</on-bind>
<on-insert-row>
<insert-node>
<entry name="" />
</insert-node>
</on-insert-row>
</repeater>
</context>
<repeater id="searchFields" parent-path="." row-path="searchFields">
<identity>
<value id="name" path="@id" />
</identity>
<on-bind>
<value id="name" path="@id" />
</on-bind>
<on-insert-row>
<insert-node>
<entry name="" />
</insert-node>
</on-insert-row>
</repeater>
</context>
========================================================================
2. ) later I tried
using only <value id="searchFields" path="@searchFields" />, with
this I am not getting any exceptions as such but I am not able to get
the values of the selected combo box.
========================================================================
3)
I also tried using
aggregator, with this I am not getting any exceptions as such but I am
not able to get the values of the selected combo box.
<aggregate
id="searchFields" parent-path="." row-path="searchFields">
<value id="value" path="@value" />
</aggregate>
========================================================================
<value id="value" path="@value" />
</aggregate>
========================================================================
My definition file
is as below:
<multivaluefield
id="searchFields">
<datatype base="string" />
<selection-list src="" dynamic="true" />
</multivaluefield>>
<datatype base="string" />
<selection-list src="" dynamic="true" />
</multivaluefield>>
Can any one please throw
some pointers what I can do to get the value from a multivaluefield or let me
know where I am going wrong
Thanks in
advance.
Regards,
Moin
Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. |
