commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon" <gor...@zareus.com>
Subject RE: [Jelly] werkz tags
Date Wed, 05 Feb 2003 13:06:07 GMT
That does work. However, how do I invoke (attain) a certain goal via
java code? Currently I execute the jelly script with the following
code...

  Writer writer = new StringWriter();
  XMLOutput output = XMLOutput.createXMLOutput(writer);

  Jelly jelly = new Jelly();
  jelly.setScript(scriptFile); // scriptFile is a string that gets
passed in.

  Script script = jelly.compileScript();

  JellyContext context = jelly.getJellyContext();
  context.setVariables(vars); // vars is a HashMap that gets passed in.

  script.run(context, output);

  output.flush();

So in my java code is there a way to specify which goal to attain? Do I
need to use the werkz api to accomplish this? If you can point me in the
right direction, I can take it from there.

Thanks,
Gordon




-----Original Message-----
From: James Strachan [mailto:james_strachan@yahoo.co.uk] 
Sent: Saturday, February 01, 2003 4:27 AM
To: Jakarta Commons Users List
Subject: Re: [Jelly] werkz tags


Try adding

    <attainGoal name="three"/>

when you need to attain a goal. I can't see any werkz JellyUnit test
cases around anywhere - it could be an idea to add some to the werkz
project.

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Gordon" <gordon@zareus.com>
To: <commons-user@jakarta.apache.org>
Sent: Saturday, February 01, 2003 7:22 AM
Subject: [Jelly] werkz tags


> If I create a jelly script using the werkz tags, how do I invoke a 
> specific goal of that script?
>
> For example, I have the following script...
>
> <project>
>
>   <goal name="one">
>     <!-- do something -->
>   </goal>
>
>   <goal name="two">
>     <!-- do something -->
>   </goal>
>
>   <goal name="three">
>     <!-- do something -->
>   </goal>
>
> </project>
>
> I want to process just goal "three" of the script. Is there sample 
> code on how to do this?
>
> Gordon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>

__________________________________________________

Do You Yahoo!?

Everything you'll ever need on one web page

from News and Sport to Email and Music Charts

http://uk.my.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org



Mime
View raw message