Using BSF I created a ScriptAction class that calls the script during ActionSupport.execute(). But there open issues. What about Objects to be accessed (get/set) by a Form. Action class would need to support some generic getter/setter methods in order to modify the according script variable. Maybe something like
class ScriptAction ... implements GenericGetterSetter { public String getValue(String name); public void setValue(String name, String value); } Does Webwork/Xwork already support something similiar to the GenericGetterSetter interface or anything similiar to the generic getter/setter methods? regards Juergen -----Ursprungliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Jason Carreira Gesendet: Dienstag, 3. Februar 2004 16:59 An: [EMAIL PROTECTED] Betreff: RE: [OS-webwork] RE: Script Action It should be relatively easy, for someone who uses a scripting environment and knows how to tell it to execute a script, to make something like this possible: <action name="createRole" class="com....BeanShellScriptAction"> <param name="script">scripts/CreateRoleAction.bsh</param> <result name="input" type="dispatcher"> <param name="location">/useradmin/createRole.ftl</param> </result> <interceptor-ref name="defaultStack"/> </action> I'm not sure about having one generic SriptAction, maybe one per script type... Jason > -----Original Message----- > From: Donnerstag, Juergen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 03, 2004 1:54 AM > To: '[EMAIL PROTECTED]' > Subject: [OS-webwork] RE: Script Action > > > I was thinking of using scripts instead of classes for rapid > development. I'm pretty sure I'll need java classes for > production later on. But for development I'd like to use > scripts. This is why the difference should be minimal only. > Groovy and BeanShell are both very much like Java. > I think OFBiz is using JPublish as well. It looks very nice, > but would require a major change in our current enviroment. > > Below you see an example of how I'm doing it currently. > > <action name="createRole" > class="org.hibernate.admin.action.CreateRoleAction"> > <result name="input" type="dispatcher"> > <param > name="location">/useradmin/createRole.ftl</param> > </result> > <interceptor-ref name="defaultStack"/> > </action> > > For development I'd like something like > <action name="createRole" > script="scripts/CreateRoleAction.bsh"> > <result name="input" type="dispatcher"> > <param > name="location">/useradmin/createRole.ftl</param> > </result> > <interceptor-ref name="defaultStack"/> > </action> > > or maybe > <action name="createRole" class="com....ScriptAction" > param="scripts/CreateRoleAction.bsh"> > <result name="input" type="dispatcher"> > <param > name="location">/useradmin/createRole.ftl</param> > </result> > <interceptor-ref name="defaultStack"/> > </action> > > regards > Juergen > > ----- Original Message ----- > From: remigijus <[EMAIL PROTECTED]> > Re: Script Action > 2004-02-02 11:58 > Regarding of script usage in Action there is another > interesting new commer groovy and groovlet. I think it would > be very interesting to use groovy for actions and groovlets > instead of JSP and velocity. I also think it can be much > better to use groovy ant groovlet for templates it definatly > will be much faster as velocity which now is used as > default. I had a chat with some guys who is working on > groovlets and they are going to to somthing to make it work > together with webwork2. Does anyone have some opinion about it. > > Remis > > ----- Original Message ----- > From: "Kris Thompson" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 02, 2004 9:28 PM > Subject: RE: [OS-webwork] Script Action > > > Thanks. I was aware of JPublish using scripting but I also > heard (but I'm not certain if this is true) that JPublish > uses XWork in it. If that is true and maybe this is what > you are referring to, do you use BeanShell as your Action > classes in XWork? > > Kris > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Anthony Eden > Sent: Monday, February 02, 2004 11:18 AM > To: [EMAIL PROTECTED] > Subject: Re: [OS-webwork] Script Action > > Kris, > > I do it for all of my webapps now, using the script support > in JPublish. I use BeanShell these days as my scripting > language of choice > > due to its similarity to Java. Works like a charm. > > -Anthony > > Kris Thompson wrote: > > >I haven't heard of those three you mentioned but this has > been out for >awhile. > http://www.artima.com/forums/flat.jsp?forum=> 121&thread=6087 > > > > >There they used JavaScript as their > classes. Sounds cool but I haven't >really heard of others > doing this. XWork is a great platform to use >these tools > since it is not dependant on the servlet API. I would very > >much be interested in hearing about others having used > scripting >languages has their action classes. > >Kris > Thompson > >-----Original Message----- > >From: [EMAIL PROTECTED] > >[mailto:[EMAIL PROTECTED] On > Behalf Of > >Donnerstag, Juergen > >Sent: Monday, February 02, 2004 4:59 AM > >To: '[EMAIL PROTECTED]' > >Subject: [OS-webwork] Script Action > > > >Hi, > > > >I'm using xwork/webwork2 and would like to use scripted > actions (BSF, >jpython, groovy, ...) instead of Java > classes. Does anybody know how to >do it? I checked the > docs, lists and wikis but did not find any >information. > > >Help is very much appreciated. >Juergen > > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, > CA. http://www.eclipsecon.org/osdn > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork