diego bowen wrote:
> Thanks Thomas, couple questions:
> 
> 1. Is there an api available that defines things like setEnumvalues for
> Databits?
> 2. How do you declare and defined an array here...what is the looping
> syntax? 

Hi Diego, the api used from the scripts is directly the one from the
Java classes, Databit.java in this case.
(https://swamp.svn.sourceforge.net/svnroot/swamp/trunk/swamp/src/de/suse/swamp/core/data/Databit.java)
How to declare an array in the scriptaction, please check the
velocity language reference for that:
http://velocity.apache.org/engine/releases/velocity-1.6.2/user-guide.html
It is also possible to use groovy scripts in swamps scriptaction, please use the
language="groovy" attribute for this.

Greetings

> 
> Thanks
> 
> --- On *Wed, 8/12/09, Thomas Schmidt /<tschm...@suse.de>/* wrote:
> 
> 
>     From: Thomas Schmidt <tschm...@suse.de>
>     Subject: Re: How do you use a Enumeration-Array! in a ScriptAction
>     To: "diego bowen" <diegobo...@yahoo.com>
>     Cc: swamp-devel@lists.sourceforge.net
>     Date: Wednesday, August 12, 2009, 4:59 AM
> 
>     diego bowen wrote:
>     > Hello Thomas, in trying to accomplish the following:
>     >
>     > Objective is to have a dropdown, "releasetags" populated with contents
>     > of "/Users/diegobowen/tmp/test.sh"
>     >
>     >  I have the following dataedit and ScriptAction defined within a node:
>     >
>     >
>     > <field path="cmscoredataset.releasetags" mandatory="yes"/>
>     >
>     >
>     > <scriptaction name="call_external">
>     >         <description>Calling external a program</description>
>     >         <script>
>     >         $executor.setExecutable("/Users/diegobowen/tmp/test.sh")
>     >         $executor.execute()
>     >     
>        $wf.getDatabit("cmscoredataset.ps").setValue($executor.getStdout())
>     >         </script>
>     > </scriptaction>
>     > Note:  /Users/diegobowen/tmp/test.sh returns the following:
>     >
>     > 1.5.0
>     > 1.5.1
>     > 1.5.3.1
>     > 1.5.3.2
>     > 1.5.3.3
>     > 1.5.3.4
>     > 1.6
>     >
>     >
>     > And the Databit Defined as:
>     >
>     > <databit name="releasetags" description="testing testing" type="enum"
>     > state="read-write"/>
> 
>     Hi Diego, tou need to set the enumeration values of the databit, not
>     the value.
>     This can be done by
>     $wf.getDatabit("cmscoredataset.ps").setEnumvalues( ... )
>     after parsing the stdout into an array.
> 
>     Greetings
> 
>     -- 
>     Thomas Schmidt (tschmidt [at] suse.de)
>     SUSE Linux Products GmbH :: Research & Development :: Tools
>     "Don't Panic", Douglas Adams (1952 - 11.05.2001)
> 
> 


-- 
Thomas Schmidt (tschmidt [at] suse.de)
SUSE Linux Products GmbH :: Research & Development :: Tools
"Don't Panic", Douglas Adams (1952 - 11.05.2001)

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
swamp-devel mailing list
swamp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swamp-devel
http://swamp.sf.net 

Reply via email to