[Opensource] Réf. : [Opensource] Finding button identities within the Transition run() method

Thierry Clement Thierry.Clement at cetim.fr
Mon Sep 16 08:32:20 PDT 2002


I would suggest to include one parameter in every transition generated by 
the controller, whose value would be an ID identifying the proper text.
In order to do that you can use the method addParam() on each 
corresponding Transition object.
[ex: myTransition.addParam("textID", Integer.toString(theTextID)  ;  // 
textID is the name of the parameter ]
When the corresponding button will be pressed, you will get the 
corresponding parameter in the controller that "handles" this action by 
using params.getParameter("param_name"), where params is the 
ControllerRequest object automaticaly passed the "state" method, and 
param_name is the name of the parameter ("textID" in my example).

N.B. In the jsp, you would include <TransitionTag> inside a <form> whose 
target is the same state that handles the action

HTH.

Thierry Clement
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20020916/07aa3f27/attachment-0002.htm


More information about the Opensource mailing list