cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Marra" <rma...@montefiore.ch>
Subject Binding problem...
Date Tue, 14 Jun 2005 07:01:23 GMT
Hi guys,
still here with some problem of binding. Let me explain the situation.
First of all a snipped of how the file are made:

-- Binding file --
...
<fb:value id="indirizzo1" path="indirizzo"/>
<fb:value id="cap" path="cap"/>
<fb:javascript id="nazione" path=".">
<fb:load-form/>
<fb:save-form>
    var formValue = widget.getValue();
    var appValue = doCountryConversion(formValue);
    jxpathPointer.setValue(appValue);
</fb:save-form>
</fb:javascript>
...
-- File definition --
...
<!-- Nazione -->
<fd:field id="nazione">
  <fd:label>Nazione:</fd:label>
  <fd:datatype base="string"/>
  <fd:selection-list src="cocoon:/nazioni.list"/>
</fd:field>
...

-- Java Bean --

public class ContactBean {
 
 
  private Country nazione;
   

  public Country getNazione(){
    return this.nazione;
  }


  public void setNazione(Country _nazione){
      this.nazione = _nazione;
  }

}


The problem is when the binding is doing this "jxpathPointer.setValue(appValue);" I got this
error:

An Error Occurred
uncaught JavaScript exception: at contatti (file:/D:/Programmi/Apache Group/cocoon-2.1.5.1/build/webapp/mf/flow/contatti.js,
Line 41) at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 171): org.apache.avalon.framework.CascadingRuntimeException:
Error invoking JavaScript event handler

org.apache.avalon.framework.CascadingRuntimeException: uncaught JavaScript exception: at contatti
(file:/D:/Programmi/Apache Group/cocoon-2.1.5.1/build/webapp/mf/flow/contatti.js, Line 41)
at (resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line 171): org.apache.avalon.framework.CascadingRuntimeException:
Error invoking JavaScript event handler

cause: org.mozilla.javascript.JavaScriptException: at top-level script (file:/D:/Programmi/Apache
Group/cocoon-2.1.5.1/build/webapp/mf/binding/contatti/contatti.xml, Line 14): java.lang.NullPointerException

The contatti.xml, Line 14 correspond to "jxpathPointer.setValue(appValue);" but appValue is
not null there is a value!!

Any suggestion is welcome.

Thanx in advance
Roberto


Mime
View raw message