cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <>
Subject Simple form event?
Date Thu, 27 Mar 2008 07:43:41 GMT
Working with Cocoon 2.1.8
I am trying to create a simple event that copies the value entered in one 
field, into another.
The form definition looks like:
<fd:field id="SiteCode" required="true">
 <fd:label>Site Code</fd:label>
 <fd:datatype base="string"/> 
     java.lang.System.err.println("Site Code changed from " + event.oldValue + " to " + event.newValue);
     var value = event.source.value;
     var typewidget = event.source.lookupWidget("../SampleCode");
<fd:field id="SampleCode" >
 <fd:label>Sample Code</fd:label>
 <fd:datatype base="string"/> 
ie. the intent is that when SiteCode is changed, this value
becomes the default for the SampleCode.
The above does not work.  
I am not sure where/how the system adds in this Javascript;
the source code for the output web page does not look any
different from before, so I am sure I am missing something

This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice,
and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.

View raw message