List Info

Thread: Plugin Return Values




Plugin Return Values
user name
2006-11-27 17:29:14
Hmmm... ok, I presume this is a noobee Java question, but
I've searched
the WIKI and read through the source on some of the plugins
and I'm
still in the dark.

My helloworld plugin works (by that I mean it doesn't cause
the blog to
blow up). But what is the secret handshake needed to provide
a return
value to the template code? Gosh! All I wanted this first
one to do was
return a simple string for crying out loud! 
Dan

P.S. is this even the right forum for this question?

---
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
Plugin Return Values
user name
2006-11-27 17:39:32
if think what you mean is putting a variable into the
context

so in the plugin somewhere put something likes this
context.put(NAME_OF_THE_VARIABLE, variable_value)

nou you can extract the 'variable_value' in your vm/jsp with
$

hope this helps


On 11/27/06, danmcginn-combs.org <danmcginn-combs.org> wrote:
> Hmmm... ok, I presume this is a noobee Java question,
but I've searched
> the WIKI and read through the source on some of the
plugins and I'm
> still in the dark.
>
> My helloworld plugin works (by that I mean it doesn't
cause the blog to
> blow up). But what is the secret handshake needed to
provide a return
> value to the template code? Gosh! All I wanted this
first one to do was
> return a simple string for crying out loud! 
> Dan
>
> P.S. is this even the right forum for this question?
>
> ---
> 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
>

------------------------------------------------------------
-------------
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
Plugin Return Values
user name
2006-11-27 17:42:11
Here is OK, but there is the blojsom-developers list which I
had intended
for more development-related questions.

But, to answer your question, plugins have access to the
context which is
just a HashMap. All the key/value pairs here are made
available to the
templates. So if you did something like:

    context.put("SOME_KEY",
"SOME_VALUE");

You'd be able to use the following in your template (e.g.
For Velocity):

    The value of SOME_KEY is: $SOME_KEY.

That should print:

    The value of SOME_KEY is: SOME_VALUE.


On 11/27/06 12:29 PM, "danmcginn-combs.org"
<danmcginn-combs.org> wrote:

> Hmmm... ok, I presume this is a noobee Java question,
but I've searched
> the WIKI and read through the source on some of the
plugins and I'm
> still in the dark.
> 
> My helloworld plugin works (by that I mean it doesn't
cause the blog to
> blow up). But what is the secret handshake needed to
provide a return
> value to the template code? Gosh! All I wanted this
first one to do was
> return a simple string for crying out loud! 
> Dan
> 
> P.S. is this even the right forum for this question?
> 
> ---
> 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-3]

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