commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean W. Ferguson" <seansli...@comcast.net>
Subject Re: [jelly] BSF and Jython Howto
Date Wed, 27 Aug 2003 19:08:54 GMT
Nevermind, again I figured it out.  :)

   <core:set var="prefix" value="CUSTOMER"/>

   <jython:script>

     print context.getVariable('prefix')

   </jython:script>

Now, if there's a better way, I'd appreciate knowing it.  :)

Sean W. Ferguson wrote:

> I was wondering if anyone has any examples of mixing jython with jelly 
> code?  I can do silly stuff like this:
> 
> <jython:script>
> 
>   from pawt import swing
>   import java
> 
>   def exit(e): java.lang.System.exit(0)
> 
>   frame = swing.JFrame('Swing Example', visible=1)
>   button = swing.JButton('Close Me!', actionPerformed=exit)
>   frame.contentPane.add(button)
>   frame.pack()
> 
> </jython:script>
> 
> But I'd like to be able to reference jelly variables in the jython.  If 
> there are good examples out there, I'd appreciate the help.  :)
> 
> Thanks
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


Mime
View raw message