ovidiu      02/02/15 17:46:55

  Modified:    src/scratchpad/schecoon/webapp example.scm
  Log:
  This is the flow control layer. Pass down to the content generation a
  hash table object, which in real life would be obtained from the
  business logic layer.
  
  Revision  Changes    Path
  1.2       +16 -1     xml-cocoon2/src/scratchpad/schecoon/webapp/example.scm
  
  Index: example.scm
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/schecoon/webapp/example.scm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- example.scm       13 Feb 2002 01:49:06 -0000      1.1
  +++ example.scm       16 Feb 2002 01:46:55 -0000      1.2
  @@ -2,5 +2,20 @@
     (let ((arg (request:get-param env "arg")))
       (printf "my-function2 a = ~s b = ~s~%" a b)
       (printf "my-function arg = ~s~%" arg)
  -    (send-page sitemap env "document2html" '(("source" . "docs/index.xml")) '())
  +    (send-page sitemap env "xsp" '(("source" . "xsp/example.xsp")) hash)
       (printf "my-function: after send-page a = ~s, b = ~s, arg ~s~%" a b arg)))
  +
  +(java/import (java/class-for-name "java.util.HashMap") "hash:" #t)
  +
  +(define hash
  +  (java/instantiate (java/class-for-name "java.util.HashMap") #() #()))
  +
  +(define objectClass (java/class-for-name "java.lang.Object"))
  +
  +(java/call hash "put" (vector objectClass objectClass) (vector (scheme->java-object 
"abc") (scheme->java-object "123")))
  +(java/call hash "put" (vector objectClass objectClass) (vector (scheme->java-object 
"def") (scheme->java-object "456")))
  +
  +;(hash:put hash "abc" "def")
  +
  +;(java->scheme-object (hash:toString hash))
  +
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to