Hi All,

I'm trying to use the (fairly straight-forward) JXPath extension
mechanism as described here: 

http://jakarta.apache.org/commons/jxpath/apidocs/org/apache/commons/jxpath/JXPathContext.html

However I am then unable to reference the function defined.  The
following is an example of what I'm doing:

var formObj = new Packages.nz.co.eunomia.FormattingObjects;
                        
jxpathContext.setFunctions(
        new Packages.org.apache.commons.jxpath.ClassFunctions(
                                        formObj.getClass(), "eunomia"
                                )
                        );
                
Followed by: 

this.lookupWidget("timeslot_container").setSelectionList(collection,
"string(./id)", "eunomia:date(./timeslotDate, 'dd/MM/yyyy')")

Which results in:

org.apache.cocoon.ProcessingException: Error executing pipeline.:
org.apache.commons.jxpath.JXPathException: Undefined function:
eunomia:date

I can only assume that the jxpathContext object used by the
setSelectionList is different to the one I'm registering my functions
against.

Has anyone managed to get this to work successfully?  Not that the
formObj object extends java.lang.Object, as you can't call the class
field from flowscript - I think that it's a reserved word in ECMAScript.

Looking forward to any insight ;)

Corin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to