cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hoskens>
Subject Forms, writing extra info
Date Wed, 03 Nov 2004 09:31:16 GMT

I have several cforms that connect to xml documents. These may contain 
default values. If a user changes a value, an attribute changed will be 
set on that value-element and on the document-element. To accomplish 
this, I have to set javascript bindings for each value looking like:

<fb:javascript id="myvalue" path="myvalue">
        var formValue = widget.getValue() == null ? new 
java.lang.String(""): new java.lang.String(widget.getValue());
        if ( !jxpathPointer.getValue().equals(formValue)){
            jxpathContext.createPathAndSetValue("@changed", "true");
jxpathContext.createPathAndSetValue("/document_root/@changed", "true");

Is there a better way to do the same?

Kind Regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message