Title: Message
Hi,
 
We are trying to get a repeater child value from a cocoon form.
I have pasted the code for your reference.
 
The code works till cocoon.log.info but gives no value  for imageId  .
 
Can anyone suggest a solution.
 
Thanks in advance.
Regards,
Moin
 

we have the following repeater in our *-def.xml  
 
<repeater id="images">
      <widgets>
        <output id=" imageId ">
          <datatype base="string" />
        </output>
        <output id="name">
          <datatype base="string" />
        </output>
        <field id="outputName">
          <label><i18n:text>Output name</i18n:text></label>
          <datatype base="string" />
        </field>
        <field id="cropInfo">
          <datatype base="string" />
        </field>
        <submit id="crop" action-command="crop" />
      </widgets>
    </repeater>
 
we have the following binding code in our *-items-binding
 
<?xml version="1.0" encoding="utf-8"?>
 
<context path="/" xmlns="http://apache.org/cocoon/forms/1.0#binding">
 
  <repeater id="images" parent-path="." row-path=".">
    <identity>
      <value id="assetID" path="metaData/image_id" />
    </identity>
    <on-bind>
      <value id="assetID" path="metaData/image_id" />
      <value id="name" path="metaData/image_name" />
    </on-bind>
  </repeater>
 
</context>
 
In the  flowscript .js we need to access the value of " imageId " in *-def.xml .We are trying
 
 var form = new Form("forms/ test -def.xml");
  form.createBinding("forms/ test -items-bind.xml"); 
  var wid = form.getWidget("images");
 
wid. class=468203211-17052004>fun(wid);
function fun(wid) 
 {
cocoon.log.info(wid. imageId .getValue());
} 
 
The code works till cocoon.log.info but gives no value  for imageId   
 
We have also tried
form.getSubmitWidget().getParent() also doesn't work.we get a message stating:
 
 " org.apache.avalon.framework.CascadingRuntimeException: getSubmitWidget is not a function. " 
 
 
 
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.

Reply via email to