I have changed the module.packages property to include the modules.screens and actions packages, however it shows the same problem. When the screen class does not exists it shows the error screen. I have the following files:
/templates/screens/Test.vm /* does not has a class file */ /templates/screens/HelloWorld.vm /templates/layouts/Test.vm /templates/layouts/HelloWorld.vm /WEB-INF/classes/com...modules/screens/DefaultScreen.class /WEB-INF/classes/com...modules/screens/HelloWorld.class ===== I will keep trying to find what is wrong, if it worked for you it should work for me.... Bye, Thanks Otto- ----- Original Message ----- From: "Eric Pugh" <[EMAIL PROTECTED]> To: "'Turbine Users List'" <[EMAIL PROTECTED]> Sent: Thursday, June 27, 2002 11:46 AM Subject: RE: Communication between actions Otto, If you look at my module package path, I actually specify each individual sub package.. so I have modules.actions and modules.screens, otherwise it doesn't seem to find them. I know it is supposed to search each package tree, but it doesn't seem to. Try that change, and let me know! Eric -----Original Message----- From: Otto Cordero [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 10:58 AM To: Turbine Users List Subject: Re: Communication between actions Hello, thanks for your help.... I am using the same version, but I cannot find a difference between my files and yours. What is happening is that turbine redirects me to the error screen and shows the default layout (Default.vm). When I removed the Default.vm it shows this: Horrible Exception: java.lang.ClassNotFoundException: Requested Screen not found: Turbine looked in the following modules.packages path: com.instaservi.roles.modules, org.apache.turbine.flux.modules, org.apache.turbine.modules] So it is still throwing an exception when it doesn�t find the class... I have started another thread in the list to discuss this issue. Thanks again, Otto. ----- Original Message ----- From: "Eric Pugh" <[EMAIL PROTECTED]> To: "'Turbine Users List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 26, 2002 5:40 PM Subject: RE: Communication between actions Otto, I have attached my DefualtScreen and my TR.props.. What vesion are you using? I am using T2.2.... Hopefully this works for you... Eric -----Original Message----- From: Otto Cordero [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 9:36 AM To: Turbine Users List Subject: Re: Communication between actions Hello, It didn't work, ... My DefaultScreen is basically an empty class, does it have to implement something special??.... Thanks. Otto ----- Original Message ----- From: "Eric Pugh" <[EMAIL PROTECTED]> To: "'Turbine Users List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 26, 2002 11:31 AM Subject: RE: Communication between actions To fix this, you have to change what your default class is.. I am not 100% sure that is the answer, but I ran into the same issue, and fixed it by changing in TR.props: services.VelocityService.default.screen=DefaultScreen and then creating a class in my screens directory called DefaultScreen. Therefore, whenever I use a template that doens't have a matching screen, then it uses the DefaultScreen class. Eric -----Original Message----- From: Otto Cordero [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 1:03 PM To: Turbine Users List Subject: Re: Communication between actions Hello, I have solved the problem with the actions, thanks to the ActionLoader. However I am having troubles when loading the templates: I am using setTemplate("template.vm"), but when there is not a class file for the template it shows the error page. According to the velocity site how to it is possible not to have a class file for the template. I suppose something in the TurbineResources.properties file specifies this behavior. How could I fix this?. Additionaly, following the logic of Eric's suggestion, in my attempt to find a solution I have tried to use LayoutLoaders to load templates and from the actions and merge them with the context.... is this possible?. Thanks. Otto ----- Original Message ----- From: "Eric Pugh" <[EMAIL PROTECTED]> To: "'Turbine Users List'" <[EMAIL PROTECTED]> Sent: Monday, June 24, 2002 6:33 PM Subject: RE: Communication between actions Here you go: import org.apache.turbine.modules.ActionLoader; import org.apache.turbine.modules.Action; . . . VelocityAction action = (VelocityAction) ActionLoader.getInstance().getInstance( "CreateReactions" ); action.doPerform( data, context ); If you need to call something besides action.doPerform, then you need to cast it to the appropriate action class... Somewhere in the velocity site docs it talks about this. Eric -----Original Message----- From: Otto Cordero [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 10:20 AM To: [EMAIL PROTECTED] Subject: Communication between actions Hello, I want to implement a default action that calls the other set of actions. In this way the default action will perform some intelligence, and then it will select wich actions and templates to use. Ok, then in some part of the code of the default action I will have something like: data.setAction("action1"); data.setAction("action2"); ... setTemplate("template"); I have tried to add info to the context in each action, but it doesn�t work, the template can not find it. How could I stablish communication between actions, is it possible to change the context in each action and then use it in the selected template?... can I use setMessage and getMessage to communicate actions?... do you have any other idea. Thanks. Otto. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> (See attached file: TurbineResources.properties) (See attached file: DefaultScreen.java) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
