<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-11867</id>
	<title>Nabble - groovy - user</title>
	<updated>2009-11-09T11:06:03Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/groovy---user-f11867.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/groovy---user-f11867.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26271910</id>
	<title>Re: default button in swingbuilder</title>
	<published>2009-11-09T11:06:03Z</published>
	<updated>2009-11-09T11:06:03Z</updated>
	<author>
		<name>shemnon</name>
	</author>
	<content type="html">In that case move the code to set the focus inside the dialog as a do later, and do a requestFocusInWindow(), and use the doLater closure...&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;dialog( ..., show:true, modal:true, ...) {&lt;br&gt;
  //...&lt;br&gt;
  myButton = button( ... defaultButton:true ...)&lt;br&gt;  //...&lt;br&gt;  doLater {&lt;/span&gt;&lt;/font&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;button.requestFocusInWindow()&lt;/span&gt;&lt;/font&gt;}&lt;br&gt;
&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;}&lt;br&gt;
&lt;br&gt;The show handler runs after the complete execution of the window.  So assuming you are running the builder in the EDT the doLater will result in a event being fired on the EDT.  I haven&amp;#39;t tried this yet so there may be some wierdness with the way modal dialogs intercept the EDT.&lt;br&gt;
&lt;br&gt;Another option is the the listeners.  windowActivated and windowGainedFocus are the two you would want to try.&lt;br&gt;&lt;br&gt;dialog ( ..., show:true, windowGainedFocus {myButton.requestFocusInWindow}, ...) {&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;
  myButton = button( ... defaultButton:true ...)&lt;br&gt;
&lt;/span&gt;&lt;/font&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;}&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;as long as myButton is unbound the above should work.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 9, 2009 at 7:14 AM, David Rosenstark &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271910&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;David.Rosenstark@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;










&lt;div link=&quot;blue&quot; vlink=&quot;blue&quot; lang=&quot;EN-US&quot;&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;Sorry, but I am still not clear on this.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;If I have a modal dialog (as is my case)
then I will not be able to run additional code to set focus. Is there on
onFocus of the window?&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;How do I catch such events in groovy?&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;Thanks,&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;David&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;

&lt;hr align=&quot;center&quot; width=&quot;100%&quot; size=&quot;2&quot;&gt;

&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;font face=&quot;Tahoma&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Tahoma; font-weight: bold;&quot;&gt;From:&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;font face=&quot;Tahoma&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Tahoma;&quot;&gt; Danno Ferrin
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271910&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;danno.ferrin@...&lt;/a&gt;] &lt;br&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Sent:&lt;/span&gt;&lt;/b&gt; Thursday, November 05, 2009
9:57 PM&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;To:&lt;/span&gt;&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271910&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;user@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Subject:&lt;/span&gt;&lt;/b&gt; Re: [groovy-user] default
button in swingbuilder&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;I would do the request
after the window deceleration...&lt;br&gt;
&lt;br&gt;
dialog( ..., show:true ...) {&lt;br&gt;
  myButton = button( ... defaultButton:true ...)&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
button.requestFocus()&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;On Wed, Nov 4, 2009 at 1:35 PM, David
 Rosenstark &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271910&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;David.Rosenstark@...&lt;/a&gt;&amp;gt;
wrote:&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div link=&quot;blue&quot; vlink=&quot;blue&quot;&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;Thanks. I am still not clear – I want to open a dialog on top of
main window and set focus to this button. So, when I hit show, I need to have
already requested focus for it?&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot; align=&quot;center&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;

&lt;hr align=&quot;center&quot; width=&quot;100%&quot; size=&quot;2&quot;&gt;

&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;font face=&quot;Tahoma&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Tahoma; font-weight: bold;&quot;&gt;From:&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;font face=&quot;Tahoma&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Tahoma;&quot;&gt; Danno Ferrin [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271910&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;danno.ferrin@...&lt;/a&gt;]
&lt;br&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Sent:&lt;/span&gt;&lt;/b&gt; Wednesday, November 04, 2009
8:00 PM&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Tahoma&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Tahoma;&quot;&gt;&lt;br&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;To:&lt;/span&gt;&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271910&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;user@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Subject:&lt;/span&gt;&lt;/b&gt; Re: [groovy-user] default
button in swingbuilder&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12pt;&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;The &amp;quot;default
button&amp;quot; only works when the focus is already on the window but not on any
other button, for example:&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br&gt;
&lt;br&gt;
new groovy.swing.SwingBuilder().edt {&lt;br&gt;
 frame(pack:true, show:true,
defaultCloseOperation:javax.swing.JFrame.DISPOSE_ON_CLOSE) {&lt;br&gt;
  flowLayout()&lt;br&gt;
  textField(&amp;quot;Yo ho ho!&amp;quot;)&lt;br&gt;
  button(&amp;quot;one&amp;quot;)&lt;br&gt;
  button(&amp;quot;two&amp;quot;, defaultButton:true, actionPerformed:
{e-&amp;gt;println &amp;#39;yo!&amp;#39;})&lt;br&gt;
  button(&amp;quot;Three&amp;quot;)&lt;br&gt;
 }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
if you place the cursor in the text component and press enter, &amp;#39;yo&amp;#39; will
fire.  But if it is on any other button or not in the frame, nothing
happens.&lt;br&gt;
&lt;br&gt;
What you probably want is keyboard focus and window focus.  To do this you
need to track the button and possibly the dialog/frame.  The swing
requestFocusInWindow and requestFocus methods can help there:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
frame {&lt;br&gt;
   //....&lt;br&gt;
   myButton = button(action: okAction, defaultButton) ...&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
myButton.requestFocusInWindow()&lt;br&gt;
// Or...&lt;br&gt;
myButton.requestFocus()&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
The difference is that requestFocusInWindow() will not attempt to cause the
root level component to gain focus, whill requestFocus() will attempt. 
And by attempt, some OS window managers may suppress that call and simply cause
the doc icon to bounce or the taskbar to flash for that task, I don&amp;#39;t rememeber
the specific rules and specific cases.  If your java app already has
focus, it should shift to the reqesting window.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;On Wed, Nov 4,
2009 at 5:01 AM, David Rosenstark
&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271910&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;David.Rosenstark@...&lt;/a&gt;&amp;gt;
wrote:&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div link=&quot;blue&quot; vlink=&quot;blue&quot;&gt;

&lt;div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;Hi,&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;I have a simple window created using swingbuilder&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;I have a few buttons and would like to have the focus on the last button
so that the user can hit enter and it closes the window with all the defaults
as set.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;I have tried defaultButton and selected but neither of these seems
to work. Any ideas?&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt; &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;  button(action: action(name: &amp;#39;Select All&amp;#39;, closure: {&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;            list1.selectedIndices
= (0 .. list1.model.size - 1) as int[]&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;          }))&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;         
button(action: action(name: &amp;#39;DeSelect All&amp;#39;, closure:{&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;                             
list1.selectedIndices = [] as int[]&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;            
}))&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;          
button(action: action(name: &amp;#39;OK&amp;#39;, defaultButton: true, selected: true, &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;                 
closure:{&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;                         
println(&amp;quot;button clicked&amp;quot;)&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;                         
list1.selectedValues.each {&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;                           
println(it)&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt;                         
dispose()&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font color=&quot;navy&quot; face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Arial; color: navy;&quot;&gt; 
                        }
}))&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br&gt;
&lt;br clear=&quot;all&quot;&gt;
&lt;br&gt;
-- &lt;br&gt;
------------------------------------------------------&lt;br&gt;
&amp;quot;But you didn&amp;#39;t.&amp;quot; - Jim Halpert, The Office S05E23&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Times New Roman&quot; size=&quot;3&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br&gt;
&lt;br clear=&quot;all&quot;&gt;
&lt;br&gt;
-- &lt;br&gt;
------------------------------------------------------&lt;br&gt;
&amp;quot;But you didn&amp;#39;t.&amp;quot; - Jim Halpert, The Office S05E23&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;

&lt;/div&gt;


&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;------------------------------------------------------&lt;br&gt;&amp;quot;But you didn&amp;#39;t.&amp;quot; - Jim Halpert, The Office S05E23&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SwingBuilder-list-tp26059884p26271910.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271789</id>
	<title>Re: On static compilation of Groovy</title>
	<published>2009-11-09T10:58:27Z</published>
	<updated>2009-11-09T10:58:27Z</updated>
	<author>
		<name>Jochen Theodorou</name>
	</author>
	<content type="html">Alex Tkachman schrieb:
&lt;br&gt;&amp;gt; Last experiments with GPars (results can be probably found in GPars
&lt;br&gt;&amp;gt; list or easily reproduced) shows that groovy brings to serious
&lt;br&gt;&amp;gt; overhead when using multi-thread-ly.
&lt;br&gt;&lt;br&gt;I agree partially. It is not because of Groovy performance in general, 
&lt;br&gt;it is because for each method invocation there will be a synchronization 
&lt;br&gt;and that leads to real bad performance if many Threads are running. In 
&lt;br&gt;other words the current runtime imposes a massive communication overhead 
&lt;br&gt;per Thread. In that regard it would not matter if single thread 
&lt;br&gt;performance of Groovy would be as fast as Java. But I am positive, that 
&lt;br&gt;those synchronizations can be removed and then the performance for 
&lt;br&gt;multithreading will be much better. Also the issue with the overhead is 
&lt;br&gt;partially related to how gpars is doing the processing and for example 
&lt;br&gt;Grails is much less influenced. So if Groovy does scale or not depends 
&lt;br&gt;on how you do things.
&lt;br&gt;&lt;br&gt;bye blackdrag
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jochen &amp;quot;blackdrag&amp;quot; Theodorou
&lt;br&gt;The Groovy Project Tech Lead (&lt;a href=&quot;http://groovy.codehaus.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovy.codehaus.org&lt;/a&gt;)
&lt;br&gt;&lt;a href=&quot;http://blackdragsview.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blackdragsview.blogspot.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/On-static-compilation-of-Groovy-tp26269191p26271789.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271269</id>
	<title>Re: On static compilation of Groovy</title>
	<published>2009-11-09T10:25:21Z</published>
	<updated>2009-11-09T10:25:21Z</updated>
	<author>
		<name>Alex Tkachman</name>
	</author>
	<content type="html">Last experiments with GPars (results can be probably found in GPars
&lt;br&gt;list or easily reproduced) shows that groovy brings to serious
&lt;br&gt;overhead when using multi-thread-ly.
&lt;br&gt;I don't want to go in any &amp;quot;negative&amp;quot; discussions as my approach is
&lt;br&gt;100% positive - both static and dynamic code can and should coexist
&lt;br&gt;together
&lt;br&gt;&lt;br&gt;On Mon, Nov 9, 2009 at 8:09 PM, David Clark &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271269&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davidclark@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; In your article you make the assertion, &amp;quot;due to performance reasons Groovy is
&lt;br&gt;&amp;gt; almost useless today for multi-core programming&amp;quot; without giving any reasons or
&lt;br&gt;&amp;gt; data to defend the assertion.  I can't think of why this assertion should
&lt;br&gt;&amp;gt; hold.  Of course Groovy is inappropriate for computation intensive code, but
&lt;br&gt;&amp;gt; this holds for any number of threads and any number of cores.  Why would
&lt;br&gt;&amp;gt; properly parallelized Groovy code be inappropriate for code that engages in
&lt;br&gt;&amp;gt; lots of IO, which is the bulk of what business oriented code does?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As for statically compiling Groovy code I'm all for it provided that 1) It's
&lt;br&gt;&amp;gt; entirely transparent for end users, 2) It does not increase the complexity of
&lt;br&gt;&amp;gt; the Groovy compiler thereby increasing bugs and slowing down development of
&lt;br&gt;&amp;gt; other features, and 3) It changes none of the semantics of current Groovy
&lt;br&gt;&amp;gt; code.  I doubt those three things are possible, but I am willing to be proved
&lt;br&gt;&amp;gt; wrong.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Also, how many of the speed problems with dynamic dispatch will be alleviated
&lt;br&gt;&amp;gt; with the new invokedynamic that is supposed to start appearing in JVM's
&lt;br&gt;&amp;gt; sometime in the future?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Also, if the objections to static compiling that I raised above cannot be met
&lt;br&gt;&amp;gt; there are alternatives to speeding up Groovy code that seem easier to
&lt;br&gt;&amp;gt; implement but would give big speedups to performance critical code.  One would
&lt;br&gt;&amp;gt; be to allow embedding java or scala code like C/C++ compiles allow embedding
&lt;br&gt;&amp;gt; of ASM code.  Granted it is already possible to mix and match Groovy, Java,
&lt;br&gt;&amp;gt; and Scala, so this doesn't provide anything that can't already be done, it
&lt;br&gt;&amp;gt; simply provides convenience to the programmer.  Another solution would be to
&lt;br&gt;&amp;gt; provide hints (via Annotations or the like) like Common Lisp allows.  This
&lt;br&gt;&amp;gt; would allow small compute intensive sections of code to go really fast, but
&lt;br&gt;&amp;gt; seems much simpler than overhauling the compiler to produce statically
&lt;br&gt;&amp;gt; dispatched code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Monday 09 November 2009, Alex Tkachman wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I've wrote small article summarizing my thoughts and prototype
&lt;br&gt;&amp;gt;&amp;gt; development of optional static compilation of Groovy
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://groovy.dzone.com/articles/groovy-and-static-compilation&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovy.dzone.com/articles/groovy-and-static-compilation&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I am really interested in opinions.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Best regards
&lt;br&gt;&amp;gt;&amp;gt; Alex
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; David
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/On-static-compilation-of-Groovy-tp26269191p26271269.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271094</id>
	<title>Re: On static compilation of Groovy</title>
	<published>2009-11-09T10:09:48Z</published>
	<updated>2009-11-09T10:09:48Z</updated>
	<author>
		<name>David Clark-9</name>
	</author>
	<content type="html">In your article you make the assertion, &amp;quot;due to performance reasons Groovy is 
&lt;br&gt;almost useless today for multi-core programming&amp;quot; without giving any reasons or 
&lt;br&gt;data to defend the assertion. &amp;nbsp;I can't think of why this assertion should 
&lt;br&gt;hold. &amp;nbsp;Of course Groovy is inappropriate for computation intensive code, but 
&lt;br&gt;this holds for any number of threads and any number of cores. &amp;nbsp;Why would 
&lt;br&gt;properly parallelized Groovy code be inappropriate for code that engages in 
&lt;br&gt;lots of IO, which is the bulk of what business oriented code does?
&lt;br&gt;&lt;br&gt;As for statically compiling Groovy code I'm all for it provided that 1) It's 
&lt;br&gt;entirely transparent for end users, 2) It does not increase the complexity of 
&lt;br&gt;the Groovy compiler thereby increasing bugs and slowing down development of 
&lt;br&gt;other features, and 3) It changes none of the semantics of current Groovy 
&lt;br&gt;code. &amp;nbsp;I doubt those three things are possible, but I am willing to be proved 
&lt;br&gt;wrong.
&lt;br&gt;&lt;br&gt;Also, how many of the speed problems with dynamic dispatch will be alleviated 
&lt;br&gt;with the new invokedynamic that is supposed to start appearing in JVM's 
&lt;br&gt;sometime in the future?
&lt;br&gt;&lt;br&gt;Also, if the objections to static compiling that I raised above cannot be met 
&lt;br&gt;there are alternatives to speeding up Groovy code that seem easier to 
&lt;br&gt;implement but would give big speedups to performance critical code. &amp;nbsp;One would 
&lt;br&gt;be to allow embedding java or scala code like C/C++ compiles allow embedding 
&lt;br&gt;of ASM code. &amp;nbsp;Granted it is already possible to mix and match Groovy, Java, 
&lt;br&gt;and Scala, so this doesn't provide anything that can't already be done, it 
&lt;br&gt;simply provides convenience to the programmer. &amp;nbsp;Another solution would be to 
&lt;br&gt;provide hints (via Annotations or the like) like Common Lisp allows. &amp;nbsp;This 
&lt;br&gt;would allow small compute intensive sections of code to go really fast, but 
&lt;br&gt;seems much simpler than overhauling the compiler to produce statically 
&lt;br&gt;dispatched code.
&lt;br&gt;&lt;br&gt;On Monday 09 November 2009, Alex Tkachman wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I've wrote small article summarizing my thoughts and prototype
&lt;br&gt;&amp;gt; development of optional static compilation of Groovy
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://groovy.dzone.com/articles/groovy-and-static-compilation&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovy.dzone.com/articles/groovy-and-static-compilation&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am really interested in opinions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Best regards
&lt;br&gt;&amp;gt; Alex
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;David
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/On-static-compilation-of-Groovy-tp26269191p26271094.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26270438</id>
	<title>Re: On static compilation of Groovy</title>
	<published>2009-11-09T09:35:28Z</published>
	<updated>2009-11-09T09:35:28Z</updated>
	<author>
		<name>Jochen Theodorou</name>
	</author>
	<content type="html">Alex Tkachman schrieb:
&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I've wrote small article summarizing my thoughts and prototype
&lt;br&gt;&amp;gt; development of optional static compilation of Groovy
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://groovy.dzone.com/articles/groovy-and-static-compilation&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovy.dzone.com/articles/groovy-and-static-compilation&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am really interested in opinions.
&lt;br&gt;&lt;br&gt;I wonder how you would make something like Grails without meta 
&lt;br&gt;programming. If you say you would not, then what exactly would be the 
&lt;br&gt;benefit for for example Grails.
&lt;br&gt;&lt;br&gt;Our builders for example are surely possible in a static language, but 
&lt;br&gt;the details are what makes it a problem. For example:
&lt;br&gt;&lt;br&gt;foo { bar() }
&lt;br&gt;&lt;br&gt;In Groovy bar might be on the delegate, on this or some dynamic stuff. 
&lt;br&gt;You can control it by setting the resolve strategy. In a static language 
&lt;br&gt;with still a delegate you would have to route the method call to a 
&lt;br&gt;method missing method and from there you would have to do the method 
&lt;br&gt;call to the real method. But if you do so, you will have to use 
&lt;br&gt;Reflection with a performance even worse than what groovy now has. Also 
&lt;br&gt;what if bar does not exist? If you don't know the delegate then how to 
&lt;br&gt;check it? the call would have to be modified to something like:
&lt;br&gt;&lt;br&gt;foo &amp;lt;U,V&amp;gt;{-&amp;gt; bar() }
&lt;br&gt;&lt;br&gt;With for example U for the return type and V for the delegate type. Only 
&lt;br&gt;then you can check. Or the alternative is that foo gives the types and 
&lt;br&gt;you save the this here. But then the method does have to exist on either 
&lt;br&gt;this or the delegate and the resolving strategy is preset by the 
&lt;br&gt;compiler too. Something like StreamingMarkupBuilder would become 
&lt;br&gt;impossible.
&lt;br&gt;&lt;br&gt;So either you decide for method missing and loose performance or you 
&lt;br&gt;don't, then you loose method missing and get problems with the resolving 
&lt;br&gt;strategy as well as having to have methods on the builder for each 
&lt;br&gt;possibility.
&lt;br&gt;&lt;br&gt;I should maybe also mention that there is a major difference between 
&lt;br&gt;{1+2} and {bar()}
&lt;br&gt;The first case is more or less an anonymous function. They don't need an 
&lt;br&gt;outer scope to close over and are not closures. They won't have the 
&lt;br&gt;problem with the delegate, but they are of no use for builder. The other 
&lt;br&gt;form needs an outside scope to define bar somehow. In Groovy this scope 
&lt;br&gt;is applied at runtime, making it more or less a closure.
&lt;br&gt;&lt;br&gt;So I claim that runtime metaprogramming, multimethods (as they are now 
&lt;br&gt;in Groovy), and builder do require dynamic dispatch.
&lt;br&gt;&lt;br&gt;In your article you mention a mixed mode. Well that is more or less what 
&lt;br&gt;I target in 1.8. There static dispatch will be done if possible and 
&lt;br&gt;dynamic dispatch when needed. The use of runtime meta programming will 
&lt;br&gt;then in some cases turn of the static dispatch. If most of the dispatch 
&lt;br&gt;is still done static, the performance should still be great. And this 
&lt;br&gt;approach will not need any annotations.
&lt;br&gt;&lt;br&gt;Of course I don't know yet if it will work as good as I think it could 
&lt;br&gt;(overhead under 100%), but if it does it will be more than good enough.
&lt;br&gt;&lt;br&gt;bye blackdrag
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jochen &amp;quot;blackdrag&amp;quot; Theodorou
&lt;br&gt;The Groovy Project Tech Lead (&lt;a href=&quot;http://groovy.codehaus.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovy.codehaus.org&lt;/a&gt;)
&lt;br&gt;&lt;a href=&quot;http://blackdragsview.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blackdragsview.blogspot.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/On-static-compilation-of-Groovy-tp26269191p26270438.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26269191</id>
	<title>On static compilation of Groovy</title>
	<published>2009-11-09T08:21:14Z</published>
	<updated>2009-11-09T08:21:14Z</updated>
	<author>
		<name>Alex Tkachman</name>
	</author>
	<content type="html">Hi guys,
&lt;br&gt;&lt;br&gt;I've wrote small article summarizing my thoughts and prototype
&lt;br&gt;development of optional static compilation of Groovy
&lt;br&gt;&lt;a href=&quot;http://groovy.dzone.com/articles/groovy-and-static-compilation&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovy.dzone.com/articles/groovy-and-static-compilation&lt;/a&gt;&lt;br&gt;&lt;br&gt;I am really interested in opinions.
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;Alex
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/On-static-compilation-of-Groovy-tp26269191p26269191.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26268061</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-09T06:56:04Z</published>
	<updated>2009-11-09T06:56:04Z</updated>
	<author>
		<name>Neil Cherry-3</name>
	</author>
	<content type="html">tog wrote:
&lt;br&gt;&amp;gt; The initial file does not go through the CXF wsdl2java :( Is this the
&lt;br&gt;&amp;gt; one having an extra &amp;quot; ?
&lt;br&gt;&lt;br&gt;That would be the udiws10.ws file that has the extra &amp;quot; .
&lt;br&gt;&lt;br&gt;&amp;gt; If yes can you tell me where is is located ?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.linuxha.com/common/udiws10.ws&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/common/udiws10.ws&lt;/a&gt;&lt;br&gt;&lt;br&gt;Normally it would be referenced from:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://isy.uucp/services.wsdl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://isy.uucp/services.wsdl&lt;/a&gt;&lt;br&gt;&lt;br&gt;Now I've noted that at least one person attempted to use GroovyWS
&lt;br&gt;to access the services.wsdl and the udiws10.ws via my linuxha.com
&lt;br&gt;site (thanks, I really do appreciate the effort) so I also put
&lt;br&gt;the files in the following locations that should work:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/services.wsdl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/services.wsdl&lt;/a&gt;&lt;br&gt;&lt;br&gt;and
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/WEB/udiws10.ws&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/WEB/udiws10.ws&lt;/a&gt;&lt;br&gt;&lt;br&gt;I think that will work and I just tested it failed similarly to
&lt;br&gt;the actual local isy.uucp device.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26268061&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26268061.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26267429</id>
	<title>Re: GroovyWS proxy.create() - class package determination?</title>
	<published>2009-11-09T06:34:37Z</published>
	<updated>2009-11-09T06:34:37Z</updated>
	<author>
		<name>casmall</name>
	</author>
	<content type="html">not sure on your environment. &amp;nbsp;If you are in grails, you can change your /conf/config.groovy to something like this. &amp;nbsp;Otherwise google for log4j configuration.
&lt;br&gt;&lt;br&gt;&lt;br&gt;// log4j configuration
&lt;br&gt;log4j = {
&lt;br&gt;&amp;nbsp; &amp;nbsp; // Example of changing the log pattern for the default console
&lt;br&gt;&amp;nbsp; &amp;nbsp; // appender:
&lt;br&gt;&amp;nbsp; &amp;nbsp; //
&lt;br&gt;&amp;nbsp; &amp;nbsp; appenders {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error &amp;nbsp;'org.codehaus.groovy.grails.web.servlet', &amp;nbsp;// &amp;nbsp;controllers
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.codehaus.groovy.grails.web.pages', // &amp;nbsp;GSP
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.codehaus.groovy.grails.web.sitemesh', // &amp;nbsp;layouts
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.codehaus.groovy.grails.web.mapping', // URL mapping
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.codehaus.groovy.grails.commons', // core / classloading
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.codehaus.groovy.grails.plugins', // plugins
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.springframework',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'org.hibernate'
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; debug	'grails.app',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'groovyx.net.ws',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'org.apache.cxf' &amp;nbsp; &amp;nbsp;// &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; warn &amp;nbsp; &amp;nbsp;'org.mortbay.log',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'org.codehaus.groovy.grails.plugins.starksecurity'
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; rootLogger=&amp;quot;stdout&amp;quot;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;chad.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Neil Cherry-3 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;casmall wrote:
&lt;br&gt;&amp;gt; found an answer to this one.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Just make sure you have info log turned on for org.apache.cxf ...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; debug	'grails.app',
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'groovyx.net.ws',
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'org.apache.cxf'
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and out will pop a nice log message giving the available classes with
&lt;br&gt;&amp;gt; package (as part of proxy.initialize()):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; dynamic.DynamicClientFactory Created classes:
&lt;br&gt;&amp;gt; com.company.caqh.services.model.beans.realtime.CAQHRealtimeInput, etc... 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; chad.
&lt;br&gt;&lt;br&gt;Chad, how do I turn on debug?
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; ncherry@linuxha.com
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GroovyWS-proxy.create%28%29---class-package-determination--tp26256875p26267429.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26267119</id>
	<title>RE: default button in swingbuilder</title>
	<published>2009-11-09T06:14:41Z</published>
	<updated>2009-11-09T06:14:41Z</updated>
	<author>
		<name>David R</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:st1=&quot;urn:schemas-microsoft-com:office:smarttags&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 11 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;&lt;o:SmartTagType namespaceuri=&quot;urn:schemas-microsoft-com:office:smarttags&quot; name=&quot;PersonName&quot; /&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
st1\:*{behavior:url(#default#ieooui) }
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=blue&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;Sorry, but I am still not clear on this.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;If I have a modal dialog (as is my case)
then I will not be able to run additional code to set focus. Is there on
onFocus of the window?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;How do I catch such events in groovy?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;Thanks,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;David&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:
10.0pt;font-family:Arial;color:navy'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center tabindex=-1&gt;

&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;font size=2 face=Tahoma&gt;&lt;span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'&gt;From:&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;font size=2 face=Tahoma&gt;&lt;span style='font-size:10.0pt;font-family:Tahoma'&gt; Danno Ferrin
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26267119&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;danno.ferrin@...&lt;/a&gt;] &lt;br&gt;
&lt;b&gt;&lt;span style='font-weight:bold'&gt;Sent:&lt;/span&gt;&lt;/b&gt; Thursday, November 05, 2009
9:57 PM&lt;br&gt;
&lt;b&gt;&lt;span style='font-weight:bold'&gt;To:&lt;/span&gt;&lt;/b&gt; &lt;st1:PersonName w:st=&quot;on&quot;&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26267119&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;user@...&lt;/a&gt;&lt;/st1:PersonName&gt;&lt;br&gt;
&lt;b&gt;&lt;span style='font-weight:bold'&gt;Subject:&lt;/span&gt;&lt;/b&gt; Re: [groovy-user] default
button in swingbuilder&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:
12.0pt'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt'&gt;I would do the request
after the window deceleration...&lt;br&gt;
&lt;br&gt;
dialog( ..., show:true ...) {&lt;br&gt;
&amp;nbsp; myButton = button( ... defaultButton:true ...)&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
button.requestFocus()&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:
12.0pt'&gt;On Wed, Nov 4, 2009 at 1:35 PM, &lt;st1:PersonName w:st=&quot;on&quot;&gt;David
 Rosenstark&lt;/st1:PersonName&gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26267119&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;David.Rosenstark@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div link=blue vlink=blue&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;Thanks. I am still not clear &amp;#8211; I want to open a dialog on top of
main window and set focus to this button. So, when I hit show, I need to have
already requested focus for it?&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;b&gt;&lt;font size=2 face=Tahoma&gt;&lt;span style='font-size:10.0pt;font-family:Tahoma;font-weight:
bold'&gt;From:&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;font size=2 face=Tahoma&gt;&lt;span style='font-size:
10.0pt;font-family:Tahoma'&gt; Danno Ferrin [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26267119&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;danno.ferrin@...&lt;/a&gt;]
&lt;br&gt;
&lt;b&gt;&lt;span style='font-weight:bold'&gt;Sent:&lt;/span&gt;&lt;/b&gt; Wednesday, November 04, 2009
8:00 PM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Tahoma&gt;&lt;span style='font-size:10.0pt;
font-family:Tahoma'&gt;&lt;br&gt;
&lt;b&gt;&lt;span style='font-weight:bold'&gt;To:&lt;/span&gt;&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26267119&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;user@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;&lt;span style='font-weight:bold'&gt;Subject:&lt;/span&gt;&lt;/b&gt; Re: [groovy-user] default
button in swingbuilder&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt'&gt;The &amp;quot;default
button&amp;quot; only works when the focus is already on the window but not on any
other button, for example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:
12.0pt'&gt;&lt;br&gt;
&lt;br&gt;
new groovy.swing.SwingBuilder().edt {&lt;br&gt;
&amp;nbsp;frame(pack:true, show:true,
defaultCloseOperation:javax.swing.JFrame.DISPOSE_ON_CLOSE) {&lt;br&gt;
&amp;nbsp; flowLayout()&lt;br&gt;
&amp;nbsp; textField(&amp;quot;Yo ho ho!&amp;quot;)&lt;br&gt;
&amp;nbsp; button(&amp;quot;one&amp;quot;)&lt;br&gt;
&amp;nbsp; button(&amp;quot;two&amp;quot;, defaultButton:true, actionPerformed:
{e-&amp;gt;println 'yo!'})&lt;br&gt;
&amp;nbsp; button(&amp;quot;Three&amp;quot;)&lt;br&gt;
&amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
if you place the cursor in the text component and press enter, 'yo' will
fire.&amp;nbsp; But if it is on any other button or not in the frame, nothing
happens.&lt;br&gt;
&lt;br&gt;
What you probably want is keyboard focus and window focus.&amp;nbsp; To do this you
need to track the button and possibly the dialog/frame.&amp;nbsp; The swing
requestFocusInWindow and requestFocus methods can help there:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
frame {&lt;br&gt;
&amp;nbsp;&amp;nbsp; //....&lt;br&gt;
&amp;nbsp;&amp;nbsp; myButton = button(action: okAction, defaultButton) ...&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
myButton.requestFocusInWindow()&lt;br&gt;
// Or...&lt;br&gt;
myButton.requestFocus()&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
The difference is that requestFocusInWindow() will not attempt to cause the
root level component to gain focus, whill requestFocus() will attempt.&amp;nbsp;
And by attempt, some OS window managers may suppress that call and simply cause
the doc icon to bounce or the taskbar to flash for that task, I don't rememeber
the specific rules and specific cases.&amp;nbsp; If your java app already has
focus, it should shift to the reqesting window.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt'&gt;On Wed, Nov 4,
2009 at 5:01 AM, &lt;st1:PersonName w:st=&quot;on&quot;&gt;David Rosenstark&lt;/st1:PersonName&gt;
&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26267119&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;David.Rosenstark@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div link=blue vlink=blue&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;Hi,&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;I have a simple window created using swingbuilder&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;I have a few buttons and would like to have the focus on the last button
so that the user can hit enter and it closes the window with all the defaults
as set.&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;I have tried defaultButton and selected but neither of these seems
to work. Any ideas?&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp; button(action: action(name: 'Select All', closure: {&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list1.selectedIndices
= (0 .. list1.model.size - 1) as int[]&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }))&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
button(action: action(name: 'DeSelect All', closure:{&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
list1.selectedIndices = [] as int[]&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}))&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
button(action: action(name: 'OK', defaultButton: true, selected: true, &lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
closure:{&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
println(&amp;quot;button clicked&amp;quot;)&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
list1.selectedValues.each {&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
println(it)&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
dispose()&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=2 color=navy face=Arial&gt;&lt;span style='font-size:10.0pt;font-family:Arial;
color:navy'&gt;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
}))&lt;/span&gt;&lt;/font&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:12.0pt'&gt;&lt;br&gt;
&lt;br clear=all&gt;
&lt;br&gt;
-- &lt;br&gt;
------------------------------------------------------&lt;br&gt;
&amp;quot;But you didn't.&amp;quot; - Jim Halpert, The Office S05E23&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;font size=3 face=&quot;Times New Roman&quot;&gt;&lt;span style='font-size:
12.0pt'&gt;&lt;br&gt;
&lt;br clear=all&gt;
&lt;br&gt;
-- &lt;br&gt;
------------------------------------------------------&lt;br&gt;
&amp;quot;But you didn't.&amp;quot; - Jim Halpert, The Office S05E23&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SwingBuilder-list-tp26059884p26267119.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26266110</id>
	<title>RE: FW: [grails-user] What's the proper way to invoke super.beforeInsert() for a Domain class?</title>
	<published>2009-11-09T05:05:13Z</published>
	<updated>2009-11-09T05:05:13Z</updated>
	<author>
		<name>Matthew.Lachman</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;'&gt;Good
idea &amp;#8211; I&amp;#8217;ll give that a shot.&amp;nbsp; On the Grails list, I also got
the following suggestion from Burt Beckwith:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;Have beforeInsert delegate to a
real method:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;class A {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; //Some properties&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; protected void
onBeforeInsert() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//Do something interesting&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; def beforeInsert =
{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
onBeforeInsert()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;class B extends A {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; //Some added
properties&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; @Override&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; protected void
onBeforeInsert() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
super.onBeforeInsert()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//Do additional interesting things&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoPlainText style='margin-left:.5in'&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;'&gt;Both
seem obvious now that I see them.&amp;nbsp; Thanks!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;'&gt;Matt&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266110&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266110&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;] &lt;b&gt;On Behalf Of &lt;/b&gt;Roshan
Dawrani&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Sunday, November 08, 2009 7:54 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266110&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;user@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: [groovy-user] FW: [grails-user] What's the proper way to
invoke super.beforeInsert() for a Domain class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;You can do it like:&lt;br&gt;
&lt;br&gt;
=================================&lt;br&gt;
class A {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; def beforeInsert = {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; println
&amp;quot;A-&amp;gt;beforeInsert()&amp;quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
class B extends A {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; def getSuperClosure() {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.getBeforeInsert()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; def beforeInsert = {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getSuperClosure()()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; println
&amp;quot;B-&amp;gt;beforeInsert()&amp;quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
new B().beforeInsert()&lt;br&gt;
=================================&lt;br&gt;
&lt;br&gt;
Hope it helps.&lt;br&gt;
&lt;br&gt;
-- Roshan&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;On Sat, Nov 7, 2009 at 2:40 AM, &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266110&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Matthew.Lachman@...&lt;/a&gt;&amp;gt;
wrote:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;I asked this question on the
Grails user list but perhaps it's more of a&lt;br&gt;
Groovy question. &amp;nbsp;How to I invoke a super class's closure that has the&lt;br&gt;
same name as &amp;quot;this&amp;quot; class's closure?&lt;br&gt;
&lt;br&gt;
-----Original Message-----&lt;br&gt;
From: Lachman, Matt (West)&lt;br&gt;
Sent: Friday, November 06, 2009 3:01 PM&lt;br&gt;
To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266110&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;user@...&lt;/a&gt;&lt;br&gt;
Subject: [grails-user] What's the proper way to invoke&lt;br&gt;
super.beforeInsert() for a Domain class?&lt;br&gt;
&lt;br&gt;
I have domain classes similar to the following:&lt;br&gt;
&lt;br&gt;
class A {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Some properties&lt;br&gt;
&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def beforeInsert = {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Do something
interesting&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
class B extends A {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Some added properties&lt;br&gt;
&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def beforeInsert = {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;super.beforeInsert()
//doesn't actually call&lt;br&gt;
A.beforeInsert()&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Do additional
interesting things&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
What's the proper way to achieve the effect I'm looking for?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Matt&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/FW%3A--grails-user--What%27s-the-proper-way-to-invoke-super.beforeInsert%28%29-for-a-Domain-class--tp26238640p26266110.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26264937</id>
	<title>Re: Creating a List</title>
	<published>2009-11-09T03:37:45Z</published>
	<updated>2009-11-09T03:37:45Z</updated>
	<author>
		<name>Tim Yates</name>
	</author>
	<content type="html">I&amp;#39;d use JsonSlurper (part of json-lib):&lt;br&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 40px; font-family: courier new,monospace;&quot;&gt;@Grab(&amp;#39;net.sf.json-lib:json-lib:2.3:jdk15&amp;#39;)&lt;br&gt;import net.sf.json.groovy.JsonSlurper&lt;br&gt;&lt;br&gt;JsonSlurper slurper = new JsonSlurper()&lt;br&gt;

def res = slurper.parseText( &amp;quot;[{\&amp;quot;name\&amp;quot;:\&amp;quot;A new member\&amp;quot;,\&amp;quot;age\&amp;quot;:21,\&amp;quot;cover\&amp;quot;:\&amp;quot;Single\&amp;quot;,\&amp;quot;londonUpgrade\&amp;quot;:0},{\&amp;quot;name\&amp;quot;:\&amp;quot;A new member\&amp;quot;,\&amp;quot;age\&amp;quot;:21,\&amp;quot;cover\&amp;quot;:\&amp;quot;Single\&amp;quot;,\&amp;quot;excess\&amp;quot;:\&amp;quot;\&amp;quot;}]&amp;quot; )&lt;br&gt;

println res&lt;br&gt;&lt;/div&gt;&lt;br&gt;Tim&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 9, 2009 at 9:55 AM, douggiefox &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264937&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;paul@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

&lt;br&gt;
Hi&lt;br&gt;
&lt;br&gt;
I have a string that&amp;#39;s come from a HTML page and is encoded like this:&lt;br&gt;
&lt;br&gt;
&amp;quot;[{\&amp;quot;name\&amp;quot;:\&amp;quot;A new&lt;br&gt;
member\&amp;quot;,\&amp;quot;age\&amp;quot;:21,\&amp;quot;cover\&amp;quot;:\&amp;quot;Single\&amp;quot;,\&amp;quot;londonUpgrade\&amp;quot;:0},{\&amp;quot;name\&amp;quot;:\&amp;quot;A&lt;br&gt;
new member\&amp;quot;,\&amp;quot;age\&amp;quot;:21,\&amp;quot;cover\&amp;quot;:\&amp;quot;Single\&amp;quot;,\&amp;quot;excess\&amp;quot;:\&amp;quot;\&amp;quot;}]&amp;quot;&lt;br&gt;
&lt;br&gt;
Is there a simple way I can convert this to a List?&lt;br&gt;
&lt;br&gt;
Best&lt;br&gt;
&lt;br&gt;
DF&lt;br&gt;
--&lt;br&gt;
View this message in context: &lt;a href=&quot;http://old.nabble.com/Creating-a-List-tp26263681p26263681.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Creating-a-List-tp26263681p26263681.html&lt;/a&gt;&lt;br&gt;
Sent from the groovy - user mailing list archive at Nabble.com.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creating-a-List-tp26263681p26264937.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263681</id>
	<title>Creating a List</title>
	<published>2009-11-09T01:55:19Z</published>
	<updated>2009-11-09T01:55:19Z</updated>
	<author>
		<name>douggiefox</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;I have a string that's come from a HTML page and is encoded like this:
&lt;br&gt;&lt;br&gt;&amp;quot;[{\&amp;quot;name\&amp;quot;:\&amp;quot;A new member\&amp;quot;,\&amp;quot;age\&amp;quot;:21,\&amp;quot;cover\&amp;quot;:\&amp;quot;Single\&amp;quot;,\&amp;quot;londonUpgrade\&amp;quot;:0},{\&amp;quot;name\&amp;quot;:\&amp;quot;A new member\&amp;quot;,\&amp;quot;age\&amp;quot;:21,\&amp;quot;cover\&amp;quot;:\&amp;quot;Single\&amp;quot;,\&amp;quot;excess\&amp;quot;:\&amp;quot;\&amp;quot;}]&amp;quot;
&lt;br&gt;&lt;br&gt;Is there a simple way I can convert this to a List?
&lt;br&gt;&lt;br&gt;Best
&lt;br&gt;&lt;br&gt;DF</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Creating-a-List-tp26263681p26263681.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26262798</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-09T00:35:33Z</published>
	<updated>2009-11-09T00:35:33Z</updated>
	<author>
		<name>tog</name>
	</author>
	<content type="html">The initial file does not go through the CXF wsdl2java :( Is this the one having an extra &amp;quot; ?&lt;br&gt;If yes can you tell me where is is located ?&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 9, 2009 at 10:56 AM, Neil Cherry &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262798&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div class=&quot;im&quot;&gt;tog wrote:&lt;br&gt;
&amp;gt; Ok I guess you are missing the service part with the port in your wsdl.&lt;br&gt;
&amp;gt; It should be something like this:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;lt;wsdl:service name=&amp;quot;TerraService&amp;quot;&amp;gt;&lt;br&gt;
&amp;gt;     &amp;lt;wsdl:port name=&amp;quot;TerraServiceSoap&amp;quot; binding=&amp;quot;tns:TerraServiceSoap&amp;quot;&amp;gt;&lt;br&gt;
&amp;gt;         &amp;lt;soap:address location=&amp;quot;&lt;a href=&quot;http://terraservice.net/TerraService.asmx&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://terraservice.net/TerraService.asmx&lt;/a&gt;&amp;quot;/&amp;gt;&lt;br&gt;
&amp;gt;     &amp;lt;/wsdl:port&amp;gt;&lt;br&gt;
&amp;gt; &amp;lt;/wsdl:service&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;Oh, sorry, I tried so many different things that I last tried the&lt;br&gt;
previous file. Here&amp;#39;s the initial file:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.linuxha.com/common/services.wsdl&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/common/services.wsdl&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Normally it would be called with:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://isy.uucp/services.wsdl&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://isy.uucp/services.wsdl&lt;/a&gt;&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
--&lt;br&gt;
&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;Linux Home Automation         Neil Cherry       &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262798&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;                         Main site&lt;br&gt;
&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;                    My HA Blog&lt;br&gt;
Author of:      Linux Smart Homes For Dummies&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;PGP KeyID: 1024D/69B00854  &lt;a href=&quot;http://subkeys.pgp.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;subkeys.pgp.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://cheztog.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cheztog.blogspot.com&lt;/a&gt;&lt;br&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26262798.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26261921</id>
	<title>Re: metaclass with enum</title>
	<published>2009-11-08T22:46:02Z</published>
	<updated>2009-11-08T22:46:02Z</updated>
	<author>
		<name>Roshan Dawrani-2</name>
	</author>
	<content type="html">Good to hear that. I get my time&amp;#39;s worth, if you are continuing to go on with groovy. :-)&lt;br&gt;&lt;br&gt;Have fun.&lt;br&gt;Roshan&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 9, 2009 at 12:12 PM, Ista Pouss &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;istaous@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;OK.&lt;br&gt;
&lt;br&gt;
I understand the expert point of view but, from a newbee point of&lt;br&gt;
view, it&amp;#39;s a curious feature !&lt;br&gt;
&lt;br&gt;
Planty of thanks, I go on with groovy.&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;br&gt;
2009/11/7 Roshan Dawrani &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt;:&lt;br&gt;
&amp;gt; Shamelessly mailing one more version. The last one!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; ===================================================&lt;br&gt;
&amp;gt; enum Ville&lt;br&gt;
&amp;gt; {&lt;br&gt;
&amp;gt;     TOKIO, PARIS&lt;br&gt;
&amp;gt; }&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Ville.metaClass.parcouru = Integer.MAX_VALUE&lt;br&gt;
&amp;gt; Ville.metaClass.précédent = 0&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; // refresh metaclass of each instance with the latest class level metaclass&lt;br&gt;
&amp;gt; Ville.values().each {enumInstance -&amp;gt;&lt;br&gt;
&amp;gt;     enumInstance.metaClass = null&lt;br&gt;
&amp;gt; }&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; assert Ville.TOKIO.parcouru == Integer.MAX_VALUE&lt;br&gt;
&amp;gt; assert Ville.TOKIO.précédent == 0&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Ville.TOKIO.parcouru = 10&lt;br&gt;
&amp;gt; assert Ville.TOKIO.parcouru == 10&lt;br&gt;
&amp;gt; assert Ville.PARIS.parcouru == Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; println &amp;quot;Done&amp;quot;&lt;br&gt;
&amp;gt; ===================================================&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; rgds,&lt;br&gt;
&amp;gt; Roshan&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; On Sat, Nov 7, 2009 at 3:15 PM, Roshan Dawrani &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt;&lt;br&gt;
&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Slightly improved version of the last solution (removes the enum&amp;#39;s&lt;br&gt;
&amp;gt;&amp;gt; metaClass field and getMetaClass() method). Sorry for so many versions. I am&lt;br&gt;
&amp;gt;&amp;gt; trying metaclass changes on enums for the first time.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; ========================================&lt;br&gt;
&amp;gt;&amp;gt; enum Ville&lt;br&gt;
&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt;     TOKIO, PARIS&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;     def addProperties(propMap) {&lt;br&gt;
&amp;gt;&amp;gt;         def emc = new ExpandoMetaClass(Ville, true, true);&lt;br&gt;
&amp;gt;&amp;gt;         setMetaClass(emc)&lt;br&gt;
&amp;gt;&amp;gt;         def itr = propMap.keySet().iterator()&lt;br&gt;
&amp;gt;&amp;gt;         while(itr.hasNext()) {&lt;br&gt;
&amp;gt;&amp;gt;             def propName = itr.next()&lt;br&gt;
&amp;gt;&amp;gt;             this.metaClass.&amp;quot;$propName&amp;quot; = propMap[propName]&lt;br&gt;
&amp;gt;&amp;gt;         }&lt;br&gt;
&amp;gt;&amp;gt;         emc.initialize();&lt;br&gt;
&amp;gt;&amp;gt;     }&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Ville.values().each { enumInstance -&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;     enumInstance.addProperties([parcouru:Integer.MAX_VALUE, précédent:0])&lt;br&gt;
&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; assert Ville.TOKIO.parcouru == Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&amp;gt; assert Ville.TOKIO.précédent == 0&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Ville.TOKIO.parcouru = 10&lt;br&gt;
&amp;gt;&amp;gt; assert Ville.TOKIO.parcouru == 10&lt;br&gt;
&amp;gt;&amp;gt; assert Ville.PARIS.parcouru == Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&amp;gt; println &amp;quot;Done&amp;quot;&lt;br&gt;
&amp;gt;&amp;gt; ========================================&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; On Sat, Nov 7, 2009 at 2:52 PM, Roshan Dawrani&lt;br&gt;
&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; Here is another solution, which changes the metaClass of enum instances&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; at runtime without needing to do a global change by calling&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; EMC.enableGlobally() :-&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; ================================================&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; enum Ville&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;     TOKIO, PARIS&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;     def metaClass&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;     MetaClass getMetaClass() {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;         if(!metaClass) {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;             metaClass = new ExpandoMetaClass(Ville, true, true);&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;             metaClass.initialize()&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;         }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;         metaClass&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;     }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;     def addProperty(propName, propValue) {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;         metaClass = new ExpandoMetaClass(Ville, true, true);&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;         this.metaClass.&amp;quot;$propName&amp;quot; = propValue&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;         metaClass.initialize();&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;     }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; // make the metaclass changes on the enum instances&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; Ville.values().each { enumInstance -&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;     enumInstance.addProperty(&amp;#39;parcouru&amp;#39;, Integer.MAX_VALUE)&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;     enumInstance.addProperty(&amp;#39;précédent&amp;#39;, 0)&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; // check if the enum has now got the new Properties&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO.parcouru == Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO.précédent == 0&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; // change runtime properties and check on different instances&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; Ville.TOKIO.parcouru = 10&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO.parcouru == 10&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; assert Ville.PARIS.parcouru == Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; println &amp;quot;Done&amp;quot;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; =======================================&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; Hope it helps.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; Roshan&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 7, 2009 at 2:26 PM, Roshan Dawrani&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ok, now I get the question fully.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; You want to define new properties on the enum but not from inside the&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; enum as I first suggested but at runtime.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; I don&amp;#39;t know at the moment a good, clean answer to that question -&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; because enums are a little special and their instance are created internally&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; when enum class is loaded, so the changes that you make to enum&amp;#39;s metaclass&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; after the enum is fully loaded (and its instances are constructed) are not&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; seen by the enum instances like TOKIO.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; Till any better answer comes along, one possible solution is below.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; =================================&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; enum Ville&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;     TOKIO, PARIS&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; // after this already constructed enum instances still pick up enum&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; class level metaclass changes made at runtime&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; ExpandoMetaClass.enableGlobally()&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ville.metaClass.cool = 10&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; println Ville.PARIS.cool&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; // after this enum instance will go back to its own MC again and not see&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; enum class level metaclass changes made at runtime&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; ExpandoMetaClass.disbleGlobally()&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; println Ville.PARIS.cool // will fail again&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; =================================&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; -- Roshan&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 7, 2009 at 2:06 PM, Ista Pouss &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;istaous@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes, but how do that on the enum itself ?&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; As an exemple, I do this code in the groovy web console :&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; class A {}&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; enum Ville {TOKIO, PARIS}&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO instanceof Ville // of course.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; A.metaClass.cool = 10&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; a = new A()&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; assert a.cool == 10&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ville.metaClass.cool = 10&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO.cool == 10 // BING !&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I do exactly the same metaClass thing, on a &amp;quot;regular&amp;quot; class (A), and&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; on an enum (Ville). It&amp;#39;s OK for instance class A (a), not for instance&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ville (TOKIO).&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The error in groovy web console (&lt;a href=&quot;http://groovyconsole.appspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://groovyconsole.appspot.com/&lt;/a&gt;) is&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; :&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; groovy.lang.MissingPropertyException: No such property: cool for class:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ville&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;        at Script1.run(Script1.groovy:12)&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2009/11/7 Roshan Dawrani &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt;:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; In the first mail you wanted to access Ville.PARIS.parcouru, which&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; meant&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; that you wanted to have &amp;quot;parcouru&amp;quot; on the enum constant, which was of&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; type&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Ville.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; If you want to add property &amp;quot;parcouru&amp;quot; at runtime on some regular&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; class,&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; then you can very easily do it. Code below shows 2 ways of doing it:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; =======================================================&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; enum Ville {TOKIO, PARIS}&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; class AlgoTown&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     Ville ville;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; String runtimePropName = &amp;quot;précédent&amp;quot;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; addPropertyWhoseNameIsKnown()&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; addPropertyWhoseNameIsNotKnownUntilRuntime(runtimePropName)&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; def addPropertyWhoseNameIsKnown() {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     AlgoTown.metaClass.parcouru = Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; def addPropertyWhoseNameIsNotKnownUntilRuntime(propName) {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     AlgoTown.metaClass.&amp;quot;$propName&amp;quot; = 0&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; def algo1 = new AlgoTown()&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; def algo2 = new AlgoTown()&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; println algo1.parcouru // Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; println algo1.&amp;quot;$runtimePropName&amp;quot; // 0&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; algo1.parcouru = 10 // change algo1&amp;#39;s parcouru property to 10&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; println algo1.parcouru // 10&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; println algo2.parcouru // algo2 still has parcouru =&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; =======================================================&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Hope it helps.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Roshan&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; On Sat, Nov 7, 2009 at 12:49 PM, Ista Pouss &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;istaous@...&lt;/a&gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 2009/11/7 Roshan Dawrani &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261921&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt;:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Hi,&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; If you don&amp;#39;t have to add enum properties parcouru and précédent&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; dynamically&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; at run-time, then you can do it like:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; ==========================================================&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; enum Ville&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     TOKIO, MAKAO, OSLO, PARIS, NANTES, ZARASTAPARTAKIS&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     Ville() {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;         parcouru = Integer.MAX_VALUE&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;         précédent = 0&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     Integer parcouru&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     Integer précédent&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Yes, but these properties are not &amp;quot;ville&amp;quot; (ie: town)&amp;#39;s properties.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; It&amp;#39;s properties for the algorithm.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; In java, I make something like that in this case :&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; class AlgoTown // stupid name, sorry&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; {&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;  Ville ville; // it&amp;#39;s the town&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;  int parcouru;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;  int précédent;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; }&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; With groovy (i&amp;#39;m a neewbee), my impression is : it is possible to&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; add&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; properties at runtime with metaclass (and expando ? ) thing. Is it a&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; rigth / good impression ? Is it The Good Thing To Do in my case ? Is&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; it possible with &amp;quot;enum&amp;quot; ? How ?&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ---------------------------------------------------------------------&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; To unsubscribe from this list, please visit:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe from this list, please visit:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/metaclass-with-enum-tp26235770p26261921.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26261894</id>
	<title>Re: metaclass with enum</title>
	<published>2009-11-08T22:42:33Z</published>
	<updated>2009-11-08T22:42:33Z</updated>
	<author>
		<name>Ista Pouss</name>
	</author>
	<content type="html">OK.
&lt;br&gt;&lt;br&gt;I understand the expert point of view but, from a newbee point of
&lt;br&gt;view, it's a curious feature !
&lt;br&gt;&lt;br&gt;Planty of thanks, I go on with groovy.
&lt;br&gt;&lt;br&gt;&lt;br&gt;2009/11/7 Roshan Dawrani &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261894&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Shamelessly mailing one more version. The last one!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ===================================================
&lt;br&gt;&amp;gt; enum Ville
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt;     TOKIO, PARIS
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ville.metaClass.parcouru = Integer.MAX_VALUE
&lt;br&gt;&amp;gt; Ville.metaClass.précédent = 0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; // refresh metaclass of each instance with the latest class level metaclass
&lt;br&gt;&amp;gt; Ville.values().each {enumInstance -&amp;gt;
&lt;br&gt;&amp;gt;     enumInstance.metaClass = null
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; assert Ville.TOKIO.parcouru == Integer.MAX_VALUE
&lt;br&gt;&amp;gt; assert Ville.TOKIO.précédent == 0
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ville.TOKIO.parcouru = 10
&lt;br&gt;&amp;gt; assert Ville.TOKIO.parcouru == 10
&lt;br&gt;&amp;gt; assert Ville.PARIS.parcouru == Integer.MAX_VALUE
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; println &amp;quot;Done&amp;quot;
&lt;br&gt;&amp;gt; ===================================================
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; rgds,
&lt;br&gt;&amp;gt; Roshan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Sat, Nov 7, 2009 at 3:15 PM, Roshan Dawrani &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261894&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Slightly improved version of the last solution (removes the enum's
&lt;br&gt;&amp;gt;&amp;gt; metaClass field and getMetaClass() method). Sorry for so many versions. I am
&lt;br&gt;&amp;gt;&amp;gt; trying metaclass changes on enums for the first time.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ========================================
&lt;br&gt;&amp;gt;&amp;gt; enum Ville
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;     TOKIO, PARIS
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     def addProperties(propMap) {
&lt;br&gt;&amp;gt;&amp;gt;         def emc = new ExpandoMetaClass(Ville, true, true);
&lt;br&gt;&amp;gt;&amp;gt;         setMetaClass(emc)
&lt;br&gt;&amp;gt;&amp;gt;         def itr = propMap.keySet().iterator()
&lt;br&gt;&amp;gt;&amp;gt;         while(itr.hasNext()) {
&lt;br&gt;&amp;gt;&amp;gt;             def propName = itr.next()
&lt;br&gt;&amp;gt;&amp;gt;             this.metaClass.&amp;quot;$propName&amp;quot; = propMap[propName]
&lt;br&gt;&amp;gt;&amp;gt;         }
&lt;br&gt;&amp;gt;&amp;gt;         emc.initialize();
&lt;br&gt;&amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Ville.values().each { enumInstance -&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;     enumInstance.addProperties([parcouru:Integer.MAX_VALUE, précédent:0])
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; assert Ville.TOKIO.parcouru == Integer.MAX_VALUE
&lt;br&gt;&amp;gt;&amp;gt; assert Ville.TOKIO.précédent == 0
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Ville.TOKIO.parcouru = 10
&lt;br&gt;&amp;gt;&amp;gt; assert Ville.TOKIO.parcouru == 10
&lt;br&gt;&amp;gt;&amp;gt; assert Ville.PARIS.parcouru == Integer.MAX_VALUE
&lt;br&gt;&amp;gt;&amp;gt; println &amp;quot;Done&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; ========================================
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Sat, Nov 7, 2009 at 2:52 PM, Roshan Dawrani
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261894&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Here is another solution, which changes the metaClass of enum instances
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; at runtime without needing to do a global change by calling
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; EMC.enableGlobally() :-
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ================================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; enum Ville
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;     TOKIO, PARIS
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;     def metaClass
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;     MetaClass getMetaClass() {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;         if(!metaClass) {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;             metaClass = new ExpandoMetaClass(Ville, true, true);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;             metaClass.initialize()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;         }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;         metaClass
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;     def addProperty(propName, propValue) {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;         metaClass = new ExpandoMetaClass(Ville, true, true);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;         this.metaClass.&amp;quot;$propName&amp;quot; = propValue
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;         metaClass.initialize();
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;     }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; // make the metaclass changes on the enum instances
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Ville.values().each { enumInstance -&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;     enumInstance.addProperty('parcouru', Integer.MAX_VALUE)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;     enumInstance.addProperty('précédent', 0)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; // check if the enum has now got the new Properties
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO.parcouru == Integer.MAX_VALUE
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO.précédent == 0
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; // change runtime properties and check on different instances
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Ville.TOKIO.parcouru = 10
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO.parcouru == 10
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; assert Ville.PARIS.parcouru == Integer.MAX_VALUE
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; println &amp;quot;Done&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; =======================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hope it helps.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Roshan
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 7, 2009 at 2:26 PM, Roshan Dawrani
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261894&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ok, now I get the question fully.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; You want to define new properties on the enum but not from inside the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; enum as I first suggested but at runtime.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I don't know at the moment a good, clean answer to that question -
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; because enums are a little special and their instance are created internally
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; when enum class is loaded, so the changes that you make to enum's metaclass
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; after the enum is fully loaded (and its instances are constructed) are not
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; seen by the enum instances like TOKIO.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Till any better answer comes along, one possible solution is below.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; =================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; enum Ville
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;     TOKIO, PARIS
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; // after this already constructed enum instances still pick up enum
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; class level metaclass changes made at runtime
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ExpandoMetaClass.enableGlobally()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ville.metaClass.cool = 10
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; println Ville.PARIS.cool
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; // after this enum instance will go back to its own MC again and not see
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; enum class level metaclass changes made at runtime
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ExpandoMetaClass.disbleGlobally()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; println Ville.PARIS.cool // will fail again
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; =================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -- Roshan
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Sat, Nov 7, 2009 at 2:06 PM, Ista Pouss &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261894&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;istaous@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Yes, but how do that on the enum itself ?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; As an exemple, I do this code in the groovy web console :
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; class A {}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; enum Ville {TOKIO, PARIS}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO instanceof Ville // of course.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; A.metaClass.cool = 10
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; a = new A()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; assert a.cool == 10
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ville.metaClass.cool = 10
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; assert Ville.TOKIO.cool == 10 // BING !
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I do exactly the same metaClass thing, on a &amp;quot;regular&amp;quot; class (A), and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; on an enum (Ville). It's OK for instance class A (a), not for instance
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ville (TOKIO).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The error in groovy web console (&lt;a href=&quot;http://groovyconsole.appspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovyconsole.appspot.com/&lt;/a&gt;) is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; :
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; groovy.lang.MissingPropertyException: No such property: cool for class:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Ville
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;        at Script1.run(Script1.groovy:12)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 2009/11/7 Roshan Dawrani &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261894&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; In the first mail you wanted to access Ville.PARIS.parcouru, which
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; meant
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; that you wanted to have &amp;quot;parcouru&amp;quot; on the enum constant, which was of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; type
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Ville.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; If you want to add property &amp;quot;parcouru&amp;quot; at runtime on some regular
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; class,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; then you can very easily do it. Code below shows 2 ways of doing it:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; =======================================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; enum Ville {TOKIO, PARIS}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; class AlgoTown
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     Ville ville;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; String runtimePropName = &amp;quot;précédent&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; addPropertyWhoseNameIsKnown()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; addPropertyWhoseNameIsNotKnownUntilRuntime(runtimePropName)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; def addPropertyWhoseNameIsKnown() {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     AlgoTown.metaClass.parcouru = Integer.MAX_VALUE
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; def addPropertyWhoseNameIsNotKnownUntilRuntime(propName) {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;     AlgoTown.metaClass.&amp;quot;$propName&amp;quot; = 0
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; def algo1 = new AlgoTown()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; def algo2 = new AlgoTown()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; println algo1.parcouru // Integer.MAX_VALUE
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; println algo1.&amp;quot;$runtimePropName&amp;quot; // 0
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; algo1.parcouru = 10 // change algo1's parcouru property to 10
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; println algo1.parcouru // 10
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; println algo2.parcouru // algo2 still has parcouru =
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Integer.MAX_VALUE
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; =======================================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Hope it helps.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; Roshan
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; On Sat, Nov 7, 2009 at 12:49 PM, Ista Pouss &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261894&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;istaous@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; 2009/11/7 Roshan Dawrani &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261894&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;roshandawrani@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; If you don't have to add enum properties parcouru and précédent
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; dynamically
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; at run-time, then you can do it like:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; ==========================================================
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; enum Ville
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     TOKIO, MAKAO, OSLO, PARIS, NANTES, ZARASTAPARTAKIS
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     Ville() {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;         parcouru = Integer.MAX_VALUE
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;         précédent = 0
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     Integer parcouru
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     Integer précédent
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Yes, but these properties are not &amp;quot;ville&amp;quot; (ie: town)'s properties.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; It's properties for the algorithm.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; In java, I make something like that in this case :
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; class AlgoTown // stupid name, sorry
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;  Ville ville; // it's the town
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;  int parcouru;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;  int précédent;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; With groovy (i'm a neewbee), my impression is : it is possible to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; add
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; properties at runtime with metaclass (and expando ? ) thing. Is it a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; rigth / good impression ? Is it The Good Thing To Do in my case ? Is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; it possible with &amp;quot;enum&amp;quot; ? How ?
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/metaclass-with-enum-tp26235770p26261894.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26261471</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-08T21:26:26Z</published>
	<updated>2009-11-08T21:26:26Z</updated>
	<author>
		<name>Neil Cherry-3</name>
	</author>
	<content type="html">tog wrote:
&lt;br&gt;&amp;gt; Ok I guess you are missing the service part with the port in your wsdl.
&lt;br&gt;&amp;gt; It should be something like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;lt;wsdl:service name=&amp;quot;TerraService&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;wsdl:port name=&amp;quot;TerraServiceSoap&amp;quot; binding=&amp;quot;tns:TerraServiceSoap&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;soap:address location=&amp;quot;&lt;a href=&quot;http://terraservice.net/TerraService.asmx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://terraservice.net/TerraService.asmx&lt;/a&gt;&amp;quot;/&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;/wsdl:port&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/wsdl:service&amp;gt;
&lt;br&gt;&lt;br&gt;Oh, sorry, I tried so many different things that I last tried the
&lt;br&gt;previous file. Here's the initial file:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/common/services.wsdl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/common/services.wsdl&lt;/a&gt;&lt;br&gt;&lt;br&gt;Normally it would be called with:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://isy.uucp/services.wsdl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://isy.uucp/services.wsdl&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261471&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26261471.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26261371</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-08T21:06:40Z</published>
	<updated>2009-11-08T21:06:40Z</updated>
	<author>
		<name>tog</name>
	</author>
	<content type="html">Ok I guess you are missing the service part with the port in your wsdl. It should be something like this:&lt;br&gt;&lt;br&gt;&amp;lt;wsdl:service name=&amp;quot;TerraService&amp;quot;&amp;gt;&lt;br&gt;    &amp;lt;wsdl:port name=&amp;quot;TerraServiceSoap&amp;quot; binding=&amp;quot;tns:TerraServiceSoap&amp;quot;&amp;gt;&lt;br&gt;
        &amp;lt;soap:address location=&amp;quot;&lt;a href=&quot;http://terraservice.net/TerraService.asmx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://terraservice.net/TerraService.asmx&lt;/a&gt;&amp;quot;/&amp;gt;&lt;br&gt;    &amp;lt;/wsdl:port&amp;gt;&lt;br&gt;&amp;lt;/wsdl:service&amp;gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;
On Mon, Nov 9, 2009 at 9:35 AM, Neil Cherry &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261371&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div class=&quot;im&quot;&gt;tog wrote:&lt;br&gt;
&amp;gt; Hi&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Yes it might help to see the wsdl. Is a wget on the url pointing to your&lt;br&gt;
&amp;gt; wsdl working ?&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;Yes, it works for the most part (found an extra &amp;quot; in the middle of&lt;br&gt;
the file with no purpose, have to file a bug on that with the&lt;br&gt;
vendor). Here&amp;#39;s the file on my site after I did a wget:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.linuxha.com/common/udiws10.ws&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/common/udiws10.ws&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
It&amp;#39;s the untouched file.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
--&lt;br&gt;
&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;Linux Home Automation         Neil Cherry       &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261371&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;                         Main site&lt;br&gt;
&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;                    My HA Blog&lt;br&gt;
Author of:      Linux Smart Homes For Dummies&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;PGP KeyID: 1024D/69B00854  &lt;a href=&quot;http://subkeys.pgp.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;subkeys.pgp.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://cheztog.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cheztog.blogspot.com&lt;/a&gt;&lt;br&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26261371.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260999</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-08T20:05:42Z</published>
	<updated>2009-11-08T20:05:42Z</updated>
	<author>
		<name>Neil Cherry-3</name>
	</author>
	<content type="html">tog wrote:
&lt;br&gt;&amp;gt; Hi
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yes it might help to see the wsdl. Is a wget on the url pointing to your
&lt;br&gt;&amp;gt; wsdl working ?
&lt;br&gt;&lt;br&gt;Yes, it works for the most part (found an extra &amp;quot; in the middle of
&lt;br&gt;the file with no purpose, have to file a bug on that with the
&lt;br&gt;vendor). Here's the file on my site after I did a wget:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/common/udiws10.ws&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/common/udiws10.ws&lt;/a&gt;&lt;br&gt;&lt;br&gt;It's the untouched file.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260999&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26260999.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260585</id>
	<title>Re: Handling RESTClient post() responses with no  content-type or body.</title>
	<published>2009-11-08T18:56:03Z</published>
	<updated>2009-11-08T18:56:03Z</updated>
	<author>
		<name>Tom Nichols</name>
	</author>
	<content type="html">MMmm, you're right; in most cases, the entity is returned, not just
&lt;br&gt;the Location header. &amp;nbsp;Unfortunately, REST is a somewhat loosely
&lt;br&gt;defined spec and I'm sure there are going to be plenty of examples of
&lt;br&gt;divergances from what &amp;quot;should&amp;quot; be done. &amp;nbsp;The RESTClient should be able
&lt;br&gt;to handle a POST without a response entity, so I've updated the latest
&lt;br&gt;SNAPSHOT to handle it.
&lt;br&gt;&lt;br&gt;-Tom
&lt;br&gt;&lt;br&gt;On Sun, Nov 8, 2009 at 3:15 PM, Jeff Gortatowsky &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260585&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;indanapt@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Not to be picky, nor I am saying the link I am providing is authoritative, but 201 SHOULD return a response which is the locations of the entity created. I realize that is being 'opinionated' and 'technical', as opposed to &amp;quot;Well here's the real world...&amp;quot;  But that has always been my understanding. CREATED means there is a new resource and a URI for it. Those representations, even if only one, should be in the entity returned with the most specific in the Location header
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://restpatterns.org/HTTP_Status_Codes/201_-_Created&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://restpatterns.org/HTTP_Status_Codes/201_-_Created&lt;/a&gt;&lt;br&gt;&amp;gt; ---------------------------------------
&lt;br&gt;&amp;gt; Jeff Gortatowsky, Fullerton, CA | Twitter: JeffGortatowsky
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Handling-RESTClient-post%28%29-responses-with-no-content-type-or-body.-tp26215319p26260585.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260562</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-08T18:52:25Z</published>
	<updated>2009-11-08T18:52:25Z</updated>
	<author>
		<name>tog</name>
	</author>
	<content type="html">Hi &lt;br&gt;&lt;br&gt;Yes it might help to see the wsdl. Is a wget on the url pointing to your wsdl working ?&lt;br&gt;&lt;br&gt;Regards&lt;br&gt;Guillaume&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Mon, Nov 9, 2009 at 8:10 AM, Neil Cherry &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260562&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div class=&quot;im&quot;&gt;casmall wrote:&lt;br&gt;
&amp;gt; I might have jumped the gun on your issue anyway Neil.  This url should point&lt;br&gt;
&amp;gt; to the wsdl of the web service you are calling into.&lt;br&gt;
&amp;gt; &amp;quot;&lt;a href=&quot;http://isy.uucp/WEB/udiws10.ws&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://isy.uucp/WEB/udiws10.ws&lt;/a&gt;&amp;quot;   I&amp;#39;m not sure this is the case - at least&lt;br&gt;
&amp;gt; from the public internet, I couldn&amp;#39;t resolve the url.  And wsdl url&amp;#39;s&lt;br&gt;
&amp;gt; commonly end in ?WSDL.&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;Sorry the .uucp domain is no longer in use outside my home (I hope).&lt;br&gt;
the is.uucp resolves from inside my home to 192.168.24.21. If you&amp;#39;d&lt;br&gt;
like to see the wsdl (&lt;a href=&quot;http://udiws10.ws&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;udiws10.ws&lt;/a&gt;) file I can post a link to it on&lt;br&gt;
my web site. The device that serves up that file is a ISY99i&lt;br&gt;
( &lt;a href=&quot;http://www.universal-devices.com/99i.htm&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.universal-devices.com/99i.htm&lt;/a&gt; ). It&amp;#39;s a web server&lt;br&gt;
interface to the Insteon devices on the power line (home automation).&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
--&lt;br&gt;
Linux Home Automation         Neil Cherry       &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260562&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;                         Main site&lt;br&gt;
&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;                    My HA Blog&lt;br&gt;
Author of:      Linux Smart Homes For Dummies&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;PGP KeyID: 1024D/69B00854  &lt;a href=&quot;http://subkeys.pgp.net&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;subkeys.pgp.net&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://cheztog.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cheztog.blogspot.com&lt;/a&gt;&lt;br&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26260562.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260501</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-08T18:40:56Z</published>
	<updated>2009-11-08T18:40:56Z</updated>
	<author>
		<name>Neil Cherry-3</name>
	</author>
	<content type="html">casmall wrote:
&lt;br&gt;&amp;gt; I might have jumped the gun on your issue anyway Neil. &amp;nbsp;This url should point
&lt;br&gt;&amp;gt; to the wsdl of the web service you are calling into.
&lt;br&gt;&amp;gt; &amp;quot;&lt;a href=&quot;http://isy.uucp/WEB/udiws10.ws&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://isy.uucp/WEB/udiws10.ws&lt;/a&gt;&amp;quot; &amp;nbsp; I'm not sure this is the case - at least
&lt;br&gt;&amp;gt; from the public internet, I couldn't resolve the url. &amp;nbsp;And wsdl url's
&lt;br&gt;&amp;gt; commonly end in ?WSDL.
&lt;br&gt;&lt;br&gt;Sorry the .uucp domain is no longer in use outside my home (I hope).
&lt;br&gt;the is.uucp resolves from inside my home to 192.168.24.21. If you'd
&lt;br&gt;like to see the wsdl (udiws10.ws) file I can post a link to it on
&lt;br&gt;my web site. The device that serves up that file is a ISY99i
&lt;br&gt;( &lt;a href=&quot;http://www.universal-devices.com/99i.htm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.universal-devices.com/99i.htm&lt;/a&gt;&amp;nbsp;). It's a web server
&lt;br&gt;interface to the Insteon devices on the power line (home automation).
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260501&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26260501.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260478</id>
	<title>Re: GroovyWS proxy.create() - class package determination?</title>
	<published>2009-11-08T18:36:33Z</published>
	<updated>2009-11-08T18:36:33Z</updated>
	<author>
		<name>Neil Cherry-3</name>
	</author>
	<content type="html">casmall wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; found an answer to this one.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Just make sure you have info log turned on for org.apache.cxf ...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; debug	'grails.app',
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'groovyx.net.ws',
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'org.apache.cxf'
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and out will pop a nice log message giving the available classes with
&lt;br&gt;&amp;gt; package (as part of proxy.initialize()):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; dynamic.DynamicClientFactory Created classes:
&lt;br&gt;&amp;gt; com.company.caqh.services.model.beans.realtime.CAQHRealtimeInput, etc... 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; chad.
&lt;/div&gt;&lt;br&gt;Chad, how do I turn on debug?
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260478&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GroovyWS-proxy.create%28%29---class-package-determination--tp26256875p26260478.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259447</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-08T16:07:57Z</published>
	<updated>2009-11-08T16:07:57Z</updated>
	<author>
		<name>casmall</name>
	</author>
	<content type="html">I might have jumped the gun on your issue anyway Neil. &amp;nbsp;This url should point to the wsdl of the web service you are calling into. &amp;quot;&lt;a href=&quot;http://isy.uucp/WEB/udiws10.ws&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://isy.uucp/WEB/udiws10.ws&lt;/a&gt;&amp;quot; &amp;nbsp; I'm not sure this is the case - at least from the public internet, I couldn't resolve the url. &amp;nbsp;And wsdl url's commonly end in ?WSDL.
&lt;br&gt;&lt;br&gt;chad.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Neil Cherry-3 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;casmall wrote:
&lt;br&gt;&amp;gt; Hey Neil,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; There seem to be issues with dynamic downloading of the wsdl from a url
&lt;br&gt;&amp;gt; (&lt;a href=&quot;http://jira.codehaus.org/browse/GMOD-96&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/GMOD-96&lt;/a&gt;) that I ran into a couple weeks ago
&lt;br&gt;&amp;gt; too. &amp;nbsp;Every soap http header response I've worked with has more than 3
&lt;br&gt;&amp;gt; lines. &amp;nbsp;You could patch the source as the defect describes - works, I tried
&lt;br&gt;&amp;gt; it. &amp;nbsp;I've opted to download and use a local .wsdl file instead. &amp;nbsp;I had to do
&lt;br&gt;&amp;gt; something like this (I'm in grails app):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def canonicalPath = (new File(&amp;quot;.&amp;quot;)).getCanonicalPath() &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def wsdlFilename = &amp;quot;wsdlFile.wsdl&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def wsdlURL
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ApplicationHolder?.application?.isWarDeployed()) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wsdlURL =
&lt;br&gt;&amp;gt; &amp;quot;file:///${canonicalPath}/../webapps/ROOT/WEB-INF/wsdls/${wsdlFilename}&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wsdlURL =
&lt;br&gt;&amp;gt; &amp;quot;file:///${canonicalPath}/grails-app/conf/wsdls/${wsdlFilename}&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def proxy = new WSClient(wsdlURL, this.class.classLoader)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy.initialize()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Now I'm struggling with my proxy.create() &amp;nbsp;:( &amp;nbsp;Have other thread on this
&lt;br&gt;&amp;gt; list.
&lt;br&gt;&lt;br&gt;I didn't understand a word you said. :-) I'm still relearning Java etal.
&lt;br&gt;I'll play with the code and see what it does (I think I understand that
&lt;br&gt;part). I've had no luck getting GroovyWS to compile as I have no idea
&lt;br&gt;how Grails works or what the error message I'm getting means. Since I'm
&lt;br&gt;not trying to learn Gradle yet I've decided to leave that one alone..
&lt;br&gt;&lt;br&gt;Thanks for the pointer and I am following your GroovyWS discussion.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; ncherry@linuxha.com
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26259447.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259397</id>
	<title>Re: GroovyWS proxy.create() - class package determination?</title>
	<published>2009-11-08T16:00:42Z</published>
	<updated>2009-11-08T16:00:42Z</updated>
	<author>
		<name>casmall</name>
	</author>
	<content type="html">found an answer to this one.
&lt;br&gt;&lt;br&gt;Just make sure you have info log turned on for org.apache.cxf ...
&lt;br&gt;&lt;br&gt;debug	'grails.app',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'groovyx.net.ws',
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'org.apache.cxf'
&lt;br&gt;&lt;br&gt;and out will pop a nice log message giving the available classes with package (as part of proxy.initialize()):
&lt;br&gt;&lt;br&gt;dynamic.DynamicClientFactory Created classes: com.company.caqh.services.model.beans.realtime.CAQHRealtimeInput, etc... 
&lt;br&gt;&lt;br&gt;chad.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;casmall wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Howdie any GroovyWS gurus,
&lt;br&gt;&lt;br&gt;I'm wondering how to find out what the fully qualified class name is for a soap method using groovy-ws. &amp;nbsp;I've tried about every combination I can come up with, but no luck. In my case ... 
&lt;br&gt;&lt;br&gt;def proxy = new WSClient(wsdlURL, this.class.classLoader)
&lt;br&gt;proxy.initialize()
&lt;br&gt;def caqhRealtimeInput = proxy.create(&amp;quot;com.realtime.beans.model.services.caqh.company.CAQHRealtimeInput&amp;quot;) // ???? How do I figure out what to use here?
&lt;br&gt;&lt;br&gt;&lt;br&gt;stack:
&lt;br&gt;java.lang.ClassNotFoundException: com.realtime.beans.model.services.caqh.company.CAQHRealtimeInput
&lt;br&gt;&lt;br&gt;&lt;br&gt;WSDL snip:
&lt;br&gt;&lt;br&gt;&amp;lt;wsdl:types&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;schema targetNamespace=&amp;quot;&lt;a href=&quot;http://realtime.beans.model.services.caqh.company.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://realtime.beans.model.services.caqh.company.com&lt;/a&gt;&amp;quot; xmlns=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot; xmlns:wsdl=&amp;quot;&lt;a href=&quot;http://schemas.xmlsoap.org/wsdl/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://schemas.xmlsoap.org/wsdl/&lt;/a&gt;&amp;quot; xmlns:xsd=&amp;quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;complexType name=&amp;quot;CAQHRealtimeInput&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;sequence&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;element name=&amp;quot;hipaa270&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;element name=&amp;quot;date&amp;quot; nillable=&amp;quot;true&amp;quot; type=&amp;quot;xsd:string&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/sequence&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/complexType&amp;gt;
&lt;br&gt;&lt;br&gt;thanks,
&lt;br&gt;chad.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GroovyWS-proxy.create%28%29---class-package-determination--tp26256875p26259397.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26258981</id>
	<title>Re: Is this a bug or not?</title>
	<published>2009-11-08T15:02:17Z</published>
	<updated>2009-11-08T15:02:17Z</updated>
	<author>
		<name>Jochen Theodorou</name>
	</author>
	<content type="html">Tim Yates schrieb:
&lt;br&gt;&amp;gt; is calling .intern() a valid way of achieving this as well?
&lt;br&gt;&lt;br&gt;inter() on GString would return toString().intern(), so I assume yes.
&lt;br&gt;&lt;br&gt;In general I advise not to use intern if there is no real need to do that.
&lt;br&gt;&lt;br&gt;bye blackdrag
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jochen &amp;quot;blackdrag&amp;quot; Theodorou
&lt;br&gt;The Groovy Project Tech Lead (&lt;a href=&quot;http://groovy.codehaus.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovy.codehaus.org&lt;/a&gt;)
&lt;br&gt;&lt;a href=&quot;http://blackdragsview.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blackdragsview.blogspot.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Is-this-a-bug-or-not--tp26251010p26258981.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26258860</id>
	<title>Re: Is this a bug or not?</title>
	<published>2009-11-08T14:45:58Z</published>
	<updated>2009-11-08T14:45:58Z</updated>
	<author>
		<name>Tim Yates</name>
	</author>
	<content type="html">is calling .intern() a valid way of achieving this as well?&lt;br&gt;&lt;br&gt;Tim&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Sun, Nov 8, 2009 at 6:10 PM, Jochen Theodorou &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26258860&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;blackdrag@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;div&gt; &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;...If you want to use the GString just to more easily build a String, then you have to convert the GString into a String first. you can do that by assigning the value to a String, by casting with a String, by using &amp;quot;as String&amp;quot; or by simply calling toString() on it.&lt;br&gt;


&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Is-this-a-bug-or-not--tp26251010p26258860.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26258811</id>
	<title>Licensing of the sample code and sample document for the online course</title>
	<published>2009-11-08T14:41:32Z</published>
	<updated>2009-11-08T14:41:32Z</updated>
	<author>
		<name>Sang Shin</name>
	</author>
	<content type="html">&lt;br&gt;I am not sure if this is the right alias to ask this question. &amp;nbsp;
&lt;br&gt;Hopefully someone
&lt;br&gt;knows the answer.
&lt;br&gt;&lt;br&gt;My name is Sang Shin. &amp;nbsp;I teach several free online courses through
&lt;br&gt;javapassion.com below.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.javapassion.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.javapassion.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;I am planning to start &amp;quot;Groovy and Grails (with Passion!)&amp;quot; online course
&lt;br&gt;from Jan. 10th, 2010.
&lt;br&gt;&lt;br&gt;Now I am wondering if I can borrow the code and document from the
&lt;br&gt;Groovy document site below &amp;nbsp;(without violating any copyright). 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://groovy.codehaus.org/Documentation&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groovy.codehaus.org/Documentation&lt;/a&gt;&lt;br&gt;&lt;br&gt;Thanks in advance.
&lt;br&gt;&lt;br&gt;-Sang
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;---------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp;Sang Shin, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26258811&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sangshinpassion@...&lt;/a&gt;, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26258811&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sang.shin@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.javapassion.com/SangShinSchedule.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.javapassion.com/SangShinSchedule.html&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Life is worth living... with Passion!)
&lt;br&gt;---------------------------------------------------------------
&lt;br&gt;&amp;quot;Ajax and Web 2.0 Programming&amp;quot; course starts from Sep. 7th, 2009
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.javapassion.com/ajaxcodecamp/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.javapassion.com/ajaxcodecamp/&lt;/a&gt;&lt;br&gt;&amp;quot;Java EE Programming Advanced&amp;quot; course starts from Oct. 1st, 2009
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.javapassion.com/javaee_advanced/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.javapassion.com/javaee_advanced/&lt;/a&gt;&lt;br&gt;---------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Licensing-of-the-sample-code-and-sample-document-for-the-online-course-tp26258811p26258811.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26258101</id>
	<title>Re: How to get Map from String?</title>
	<published>2009-11-08T13:24:07Z</published>
	<updated>2009-11-08T13:24:07Z</updated>
	<author>
		<name>Hubert Chang</name>
	</author>
	<content type="html">In a news site, one nodes can refer to many nodes, can embeded many nodes, can have out-link with many nodes, I have a class named as NodeRelation with
&lt;br&gt;class NodeRelation {
&lt;br&gt;&amp;nbsp; Node fromNode
&lt;br&gt;&amp;nbsp;NodeRevision fromRevision
&lt;br&gt;&amp;nbsp;Node toNode
&lt;br&gt;&amp;nbsp;Node toRevision
&lt;br&gt;&amp;nbsp;Integer weight
&lt;br&gt;&amp;nbsp;String relationType
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;In Node class, I want to store two string, 
&lt;br&gt;&amp;nbsp; String nodeReferring
&lt;br&gt;&amp;nbsp; String nodeReferred
&lt;br&gt;&lt;br&gt;So, I can get the relationship from one query.
&lt;br&gt;&lt;br&gt;I just want to serialize the two string with a easy way.
&lt;br&gt;&lt;br&gt;I am trying groovy.util.Eval class to achieve it.
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Martin C. Martin wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;There probably isn't a way, e.g. both these print exactly the same thing:
&lt;br&gt;a = [b:'[c:d]']
&lt;br&gt;println a.toMapString()
&lt;br&gt;a = [b:[c:'d'] ]
&lt;br&gt;println a.toMapString()
&lt;br&gt;&lt;br&gt;But if you use inspect() instead of toMapString(), you get something 
&lt;br&gt;parsable. &amp;nbsp;However, not many objects implement inspect(), so if you're 
&lt;br&gt;using classes you haven't written yourself, you'll either have to add 
&lt;br&gt;them using something like the Expando Meta Class, or abandon inspect() 
&lt;br&gt;altogether.
&lt;br&gt;&lt;br&gt;The output of inspect() should be valid groovy source, so you could 
&lt;br&gt;eval() it.
&lt;br&gt;&lt;br&gt;What's the use case for this? &amp;nbsp;Why not use Java's serialization to do it?
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;Martin
&lt;br&gt;&lt;br&gt;Hubert Chang wrote:
&lt;br&gt;&amp;gt; def a= [:]
&lt;br&gt;&amp;gt; a = [b:[c:'d:=e', f:'g'], h:'i']
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; a.toMapString() &amp;nbsp; ==&amp;gt; &amp;nbsp; &amp;nbsp;[b:[c:d:=e, f:g], h:i]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; How can I get the original linkedHashMap from a given '[b:[c:d:=e, f:g],
&lt;br&gt;&amp;gt; h:i]' string?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks a lot.
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-get-Map-from-String--tp26257522p26258101.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26258093</id>
	<title>Re: Groovy Eclipse Editor Copy Paste Down</title>
	<published>2009-11-08T13:23:17Z</published>
	<updated>2009-11-08T13:23:17Z</updated>
	<author>
		<name>Andrew Eisenberg</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;This is now working in the latest snapshot. &amp;nbsp;Please update your
&lt;br&gt;groovy-eclipse version.
&lt;br&gt;&lt;br&gt;On Sat, Nov 7, 2009 at 9:31 PM, akiliner &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26258093&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;drypot@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm using eclipse 3.5
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Copy &amp; Paste in ${}, eclipse crash.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; for example, If I paste something in XXX position, eclipse does not
&lt;br&gt;&amp;gt; response.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;quot;session.logged: ${session.XXX}&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Turning off eclipse option, Java &amp;gt; Editor &amp;gt; Typing &amp;gt; Adjust Indentation,
&lt;br&gt;&amp;gt; remove this problem.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Groovy-Eclipse-Editor-Copy-Paste-Down-tp26251171p26251171.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Groovy-Eclipse-Editor-Copy-Paste-Down-tp26251171p26251171.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the groovy - user mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Groovy-Eclipse-Editor-Copy-Paste-Down-tp26251171p26258093.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26258083</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-08T13:22:14Z</published>
	<updated>2009-11-08T13:22:14Z</updated>
	<author>
		<name>Neil Cherry-3</name>
	</author>
	<content type="html">casmall wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hey Neil,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; There seem to be issues with dynamic downloading of the wsdl from a url
&lt;br&gt;&amp;gt; (&lt;a href=&quot;http://jira.codehaus.org/browse/GMOD-96&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/GMOD-96&lt;/a&gt;) that I ran into a couple weeks ago
&lt;br&gt;&amp;gt; too. &amp;nbsp;Every soap http header response I've worked with has more than 3
&lt;br&gt;&amp;gt; lines. &amp;nbsp;You could patch the source as the defect describes - works, I tried
&lt;br&gt;&amp;gt; it. &amp;nbsp;I've opted to download and use a local .wsdl file instead. &amp;nbsp;I had to do
&lt;br&gt;&amp;gt; something like this (I'm in grails app):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def canonicalPath = (new File(&amp;quot;.&amp;quot;)).getCanonicalPath() &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def wsdlFilename = &amp;quot;wsdlFile.wsdl&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def wsdlURL
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ApplicationHolder?.application?.isWarDeployed()) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wsdlURL =
&lt;br&gt;&amp;gt; &amp;quot;file:///${canonicalPath}/../webapps/ROOT/WEB-INF/wsdls/${wsdlFilename}&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wsdlURL =
&lt;br&gt;&amp;gt; &amp;quot;file:///${canonicalPath}/grails-app/conf/wsdls/${wsdlFilename}&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def proxy = new WSClient(wsdlURL, this.class.classLoader)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy.initialize()
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Now I'm struggling with my proxy.create() &amp;nbsp;:( &amp;nbsp;Have other thread on this
&lt;br&gt;&amp;gt; list.
&lt;/div&gt;&lt;br&gt;I didn't understand a word you said. :-) I'm still relearning Java etal.
&lt;br&gt;I'll play with the code and see what it does (I think I understand that
&lt;br&gt;part). I've had no luck getting GroovyWS to compile as I have no idea
&lt;br&gt;how Grails works or what the error message I'm getting means. Since I'm
&lt;br&gt;not trying to learn Gradle yet I've decided to leave that one alone..
&lt;br&gt;&lt;br&gt;Thanks for the pointer and I am following your GroovyWS discussion.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26258083&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ncherry@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26258083.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26257941</id>
	<title>Re: How to get Map from String?</title>
	<published>2009-11-08T13:03:00Z</published>
	<updated>2009-11-08T13:03:00Z</updated>
	<author>
		<name>frapas</name>
	</author>
	<content type="html">&lt;div&gt;Hi&lt;/div&gt;&lt;div&gt;probably not the best solution:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;h=  new GroovyShell().evaluate(&amp;quot;[b:[c:&amp;#39;d:=e&amp;#39;, f:&amp;#39;g&amp;#39;], h:&amp;#39;i&amp;#39;]&amp;quot;)&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-get-Map-from-String--tp26257522p26257941.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26257721</id>
	<title>Re: How to get Map from String?</title>
	<published>2009-11-08T12:39:38Z</published>
	<updated>2009-11-08T12:39:38Z</updated>
	<author>
		<name>Martin C. Martin</name>
	</author>
	<content type="html">There probably isn't a way, e.g. both these print exactly the same thing:
&lt;br&gt;a = [b:'[c:d]']
&lt;br&gt;println a.toMapString()
&lt;br&gt;a = [b:[c:'d'] ]
&lt;br&gt;println a.toMapString()
&lt;br&gt;&lt;br&gt;But if you use inspect() instead of toMapString(), you get something 
&lt;br&gt;parsable. &amp;nbsp;However, not many objects implement inspect(), so if you're 
&lt;br&gt;using classes you haven't written yourself, you'll either have to add 
&lt;br&gt;them using something like the Expando Meta Class, or abandon inspect() 
&lt;br&gt;altogether.
&lt;br&gt;&lt;br&gt;The output of inspect() should be valid groovy source, so you could 
&lt;br&gt;eval() it.
&lt;br&gt;&lt;br&gt;What's the use case for this? &amp;nbsp;Why not use Java's serialization to do it?
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;Martin
&lt;br&gt;&lt;br&gt;Hubert Chang wrote:
&lt;br&gt;&amp;gt; def a= [:]
&lt;br&gt;&amp;gt; a = [b:[c:'d:=e', f:'g'], h:'i']
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; a.toMapString() &amp;nbsp; ==&amp;gt; &amp;nbsp; &amp;nbsp;[b:[c:d:=e, f:g], h:i]
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; How can I get the original linkedHashMap from a given '[b:[c:d:=e, f:g],
&lt;br&gt;&amp;gt; h:i]' string?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks a lot.
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-get-Map-from-String--tp26257522p26257721.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26257522</id>
	<title>How to get Map from String?</title>
	<published>2009-11-08T12:23:06Z</published>
	<updated>2009-11-08T12:23:06Z</updated>
	<author>
		<name>Hubert Chang</name>
	</author>
	<content type="html">def a= [:]
&lt;br&gt;a = [b:[c:'d:=e', f:'g'], h:'i']
&lt;br&gt;&lt;br&gt;a.toMapString() &amp;nbsp; ==&amp;gt; &amp;nbsp; &amp;nbsp;[b:[c:d:=e, f:g], h:i]
&lt;br&gt;&lt;br&gt;How can I get the original linkedHashMap from a given '[b:[c:d:=e, f:g], h:i]' string?
&lt;br&gt;&lt;br&gt;Thanks a lot.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-get-Map-from-String--tp26257522p26257522.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26257467</id>
	<title>Re: Handling RESTClient post() responses with no  content-type or body.</title>
	<published>2009-11-08T12:15:20Z</published>
	<updated>2009-11-08T12:15:20Z</updated>
	<author>
		<name>Jeffrey D. Gortatowsky</name>
	</author>
	<content type="html">Not to be picky, nor I am saying the link I am providing is authoritative, but 201 SHOULD return a response which is the locations of the entity created. I realize that is being 'opinionated' and 'technical', as opposed to &amp;quot;Well here's the real world...&amp;quot; &amp;nbsp;But that has always been my understanding. CREATED means there is a new resource and a URI for it. Those representations, even if only one, should be in the entity returned with the most specific in the Location header
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://restpatterns.org/HTTP_Status_Codes/201_-_Created&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://restpatterns.org/HTTP_Status_Codes/201_-_Created&lt;/a&gt;&lt;br&gt;---------------------------------------
&lt;br&gt;Jeff Gortatowsky, Fullerton, CA | Twitter: JeffGortatowsky 
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Handling-RESTClient-post%28%29-responses-with-no-content-type-or-body.-tp26215319p26257467.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26257029</id>
	<title>Re: Problems with GroovyWS</title>
	<published>2009-11-08T11:28:44Z</published>
	<updated>2009-11-08T11:28:44Z</updated>
	<author>
		<name>casmall</name>
	</author>
	<content type="html">Hey Neil,
&lt;br&gt;&lt;br&gt;There seem to be issues with dynamic downloading of the wsdl from a url (&lt;a href=&quot;http://jira.codehaus.org/browse/GMOD-96&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://jira.codehaus.org/browse/GMOD-96&lt;/a&gt;) that I ran into a couple weeks ago too. &amp;nbsp;Every soap http header response I've worked with has more than 3 lines. &amp;nbsp;You could patch the source as the defect describes - works, I tried it. &amp;nbsp;I've opted to download and use a local .wsdl file instead. &amp;nbsp;I had to do something like this (I'm in grails app):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def canonicalPath = (new File(&amp;quot;.&amp;quot;)).getCanonicalPath() &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def wsdlFilename = &amp;quot;wsdlFile.wsdl&amp;quot;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def wsdlURL
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ApplicationHolder?.application?.isWarDeployed()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wsdlURL = &amp;quot;file:///${canonicalPath}/../webapps/ROOT/WEB-INF/wsdls/${wsdlFilename}&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wsdlURL = &amp;quot;file:///${canonicalPath}/grails-app/conf/wsdls/${wsdlFilename}&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def proxy = new WSClient(wsdlURL, this.class.classLoader)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; proxy.initialize()
&lt;br&gt;&lt;br&gt;Now I'm struggling with my proxy.create() &amp;nbsp;:( &amp;nbsp;Have other thread on this list.
&lt;br&gt;&lt;br&gt;Good Luck
&lt;br&gt;chad.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Neil Cherry-3 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I'm attempting to use GroovyWS (0.5.0) with the following code:
&lt;br&gt;&lt;br&gt;import groovyx.net.ws.WSClient
&lt;br&gt;&lt;br&gt;@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.0')
&lt;br&gt;&lt;br&gt;getProxy(wsdl, classLoader) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; new WSClient(wsdl, classLoader)
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;url = &amp;quot;&lt;a href=&quot;http://isy.uucp/WEB/udiws10.ws&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://isy.uucp/WEB/udiws10.ws&lt;/a&gt;&amp;quot;
&lt;br&gt;&lt;br&gt;proxy = new WSClient(url, this.class.classLoader)
&lt;br&gt;&lt;br&gt;proxy.initialize()
&lt;br&gt;&lt;br&gt;ERROR org.apache.cxf.service.factory.ServiceConstructionException:
&lt;br&gt;NO_SERVICE_EXC
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.cxf.wsdl11.WSDLServiceFactory.create (WSDLServiceFactory.java:102)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.cxf.endpoint.ClientImpl.&amp;lt;init&amp;gt; (ClientImpl.java:145)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
&lt;br&gt;(DynamicClientFactory.java:253)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
&lt;br&gt;(DynamicClientFactory.java:196)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient
&lt;br&gt;(DynamicClientFactory.java:175)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at groovyx.net.ws.AbstractCXFWSClient.createClient (AbstractCXFWSClient.java:194)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at groovyx.net.ws.WSClient.initialize (WSClient.java:107)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at groovyx.net.ws.IWSClient$initialize.call (Unknown Source)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at groovysh_evaluate.run (groovysh_evaluate:3)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&lt;br&gt;&lt;br&gt;I've tried the simplier services from the GrovvyWS page and they work
&lt;br&gt;fine. But what I have noticed with the above is that the rather large
&lt;br&gt;wsdl file gets truncated while sending over the network. I'm unable to
&lt;br&gt;diagnose the problem any further because I'm a bit new to Java, WSDL
&lt;br&gt;and Groovy.
&lt;br&gt;&lt;br&gt;One last data point I was able to test the wsdl with SoupUI and I was able
&lt;br&gt;to validate the wsdl and test the service.
&lt;br&gt;&lt;br&gt;Any pointers what to do next?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Linux Home Automation &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Neil Cherry &amp;nbsp; &amp;nbsp; &amp;nbsp; ncherry@linuxha.com
&lt;br&gt;&lt;a href=&quot;http://www.linuxha.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linuxha.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Main site
&lt;br&gt;&lt;a href=&quot;http://linuxha.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linuxha.blogspot.com/&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My HA Blog
&lt;br&gt;Author of: &amp;nbsp; &amp;nbsp;	Linux Smart Homes For Dummies
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problems-with-GroovyWS-tp26217638p26257029.html" />
</entry>

</feed>
