home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / 05custom-bind.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  1.8 KB  |  50 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17.  
  18. <fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
  19.             xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
  20.         path="/" >
  21.  
  22.   <!--+ 
  23.       | This file shows a sample of using the javascript binding. 
  24.       +-->
  25.   <fb:javascript id="jswrap" path="jswrap-value" >
  26.     <fb:save-form>
  27.       var formValue = widget.getValue();
  28.       // you can call a function from anywhere in the flowscript
  29.       var appValue = doSaveConversion(formValue, "-");
  30.       jxpathPointer.setValue(appValue);   
  31.     </fb:save-form>
  32.     <fb:load-form>
  33.       var appValue = jxpathPointer.getValue();
  34.       // you can call a function from anywhere in the flowscript
  35.       var formValue = doLoadConversion(appValue, "-");
  36.       widget.setValue(formValue);
  37.     </fb:load-form>
  38.   </fb:javascript>
  39.  
  40.   <fb:custom id="custom" path="custom-value" 
  41.       class="org.apache.cocoon.forms.samples.bindings.CustomValueWrapBinding"/>
  42.   
  43.   <fb:custom id="config" path="config-value" 
  44.       builderclass="org.apache.cocoon.forms.samples.bindings.CustomValueWrapBinding"
  45.       factorymethod="createBinding" >
  46.       <fb:config prefixchar="[" suffixchar="]" />      
  47.   </fb:custom>
  48.  
  49. </fb:context>
  50.