List Info

Thread: Weather Plugin and oh yeah, GROOVY




Weather Plugin and oh yeah, GROOVY
user name
2006-11-22 21:38:27
I'm playing around with the weather plugin. I noticed that I
can use
some of the public functions (getFahrenheit, etc.) as
elements in the
blog. So I've done this. However, if the information isn't
readily
available, it prints out the template information as is,
$BLOJSOM_WEATHER etc. etc (); Is there any way to make it
wait until it
gets the appropriate information before printing the column
(which is
where I've placed it in my template)?

Oh yeah, I noticed that there is a Groovy dispatcher. I
wanted to find
out if anyone is using Groovy for anything. Is it better
than
plain-old-java for plugins? Any suggestions/pointers?

thanks,
Dan
---
Dan McGinn-Combs
danmcginn-combs.org
Peachtree City, GA USA
+1 770 487 6321



------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
Weather Plugin and oh yeah, GROOVY
user name
2006-11-22 21:49:31
Just use a '!' in-between the $ and the call to the object's
method. That'll
print out nothing if data isn't available (like null). So:

    $!weather.getSomeProperty()

But, for something like the weather plugin, the data should
be filled in for
the object by the time you get to the template meaning it
should've already
parsed the XML response.

I wrote the Groovy dispatcher as a proof-of-concept. There
is also a
GroovyPlugin that could parse a Groovy script as a plugin
on-the-fly. Again,
more proof-of-concept. They were fun to write to see how
that type of
scripting could be integrated within blojsom. If you find
'em useful, well
... Rock on.

On 11/22/06 4:38 PM, "danmcginn-combs.org"
<danmcginn-combs.org> wrote:

> I'm playing around with the weather plugin. I noticed
that I can use
> some of the public functions (getFahrenheit, etc.) as
elements in the
> blog. So I've done this. However, if the information
isn't readily
> available, it prints out the template information as
is,
> $BLOJSOM_WEATHER etc. etc (); Is there any way to make
it wait until it
> gets the appropriate information before printing the
column (which is
> where I've placed it in my template)?
> 
> Oh yeah, I noticed that there is a Groovy dispatcher. I
wanted to find
> out if anyone is using Groovy for anything. Is it
better than
> plain-old-java for plugins? Any suggestions/pointers?
> 
> thanks,
> Dan
> ---
> Dan McGinn-Combs
> danmcginn-combs.org
> Peachtree City, GA USA
> +1 770 487 6321
> 
> 
> 
>
------------------------------------------------------------
-------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share your
> opinions on IT & business topics through brief
surveys - and earn cash
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Blojsom-users mailing list
> Blojsom-userslists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers

-- 
David Czarnecki

http://www.blojsom.com/b
log/ | http://blojsom.sf.net



------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )