You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/08/09 20:43:10 UTC

cvs commit: jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/swing example.jelly

jstrachan    2002/08/09 11:43:10

  Modified:    jelly/src/test/org/apache/commons/jelly/swing example.jelly
  Log:
  added <windowListener> tag so that window listeners can be defined using Jelly script
  
  unfortunately there's a minor bug in the demo where the stream gets closed after the UI is displayed, so that when the window is closed we get an IOException.
  Will fix this soon.
  
  Revision  Changes    Path
  1.4       +11 -1     jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/swing/example.jelly
  
  Index: example.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/swing/example.jelly,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- example.jelly	24 Jul 2002 17:34:43 -0000	1.3
  +++ example.jelly	9 Aug 2002 18:43:10 -0000	1.4
  @@ -1,6 +1,14 @@
   <?xml version="1.0"?>
  -<j:jelly xmlns:j="jelly:core" xmlns="jelly:swing" xmlns:log="jelly:log">
  +<j:jelly 
  +	xmlns:j="jelly:core" 
  +	xmlns="jelly:swing" 
  +	xmlns:log="jelly:log"
  +	xmlns:define="jelly:define">
   
  +  <define:script var="onClosing">
  +    <log:info>The frame is closing via event: ${event}</log:info>
  +  </define:script>
  +  
     <frame title="This is a frame" var="frame" location="100,100" size="800,400">
       <menuBar>
         <menu text="File">
  @@ -38,6 +46,8 @@
           <table model="${tableModel}"/>
         </scrollPane>
       </splitPane>
  +    
  +    <windowListener var="event" closing="${onClosing}"/>
     </frame>
     
     ${frame.show()}
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>