atom feed4 messages in org.codehaus.groovy.griffon-userRe: [groovy-griffon-user] Views
FromSent OnAttachments
James WilliamsMay 25, 2008 11:14 am 
Danno FerrinMay 25, 2008 4:41 pm 
James WilliamsMay 25, 2008 4:57 pm 
Danno FerrinMay 25, 2008 6:02 pm 
Subject:Re: [groovy-griffon-user] Views
From:James Williams (jame@gmail.com)
Date:May 25, 2008 4:57:16 pm
List:org.codehaus.groovy.griffon-user

Each grails tag has an attribute map and a body which is whatever the textual content of the body. That content can be output as is or further processed.

They generally take this form in the taglib class:

class SimpleTagLib { def emoticon = { attrs, body -> out << body() << attrs.happy == 'true' ? " :-)" : " :-(" } }

maybe we could use a base view interface that provides hooks to bind the child content to body/content/child whatever? You know for when the binding is walking the tree...This is off the top of the head pondering so coherence is not desired but not guaranteed.

On Sun, May 25, 2008 at 7:42 PM, Danno Ferrin <dann@shemnon.com> wrote:

That's what I was thinking. TweetLine would be a good example.

So a new factory that contains a groovy.lang.Script instance is needed, and we just throw the whole contents of the attributes into the bindings when we create a new instance.

We also need to think about how child content is handled... How do grails tags handle child content?

On Sun, May 25, 2008 at 12:14 PM, James Williams < jame@gmail.com> wrote:

Should we regard views in griffon as analogous to taglibs in grails and have them automatically register with the Swing(X)Builder binding as part of setup?