hi Prabhakar,
In this scenario , your second event will not get executed because
after getting response success(or error) from first event it will not
return back to call the second event.
For achieving required functionality you can use response
type="request-redirect" in your first response
e.g
<request-map uri="submit">
<security https="false" auth="false" />
<event type="java" path="org.mindtree.testapp.EmployeeEvents"
invoke="createEmployee"/>
<response name="success" type="request-redirect" value="submitAgain"
/>
</request-map>
<request-map uri="submitAgain">
<security https="false" auth="false" />
<event type="java" path="org.mindtree.testapp.EmployeeEvents"
invoke="viewEmployee"/>
<response name="success" type="view" value="main" />
</request-map>
Thank you & Regards
Mayank Sheth
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com/
On 07/13/2012 05:42 PM, Prabhakar Pandey wrote:
Here is a snippet of my controller.xml
*<request-map uri="submit">
<security https="false" auth="false" />
<event type="java" path="org.mindtree.testapp.EmployeeEvents"
invoke="createEmployee"/>
<event type="java" path="org.mindtree.testapp.EmployeeEvents"
invoke="viewEmployee"/>
<response name="success" type="view" value="main" />
</request-map>
*
can i have two events in it? and through Employee Events i am calling
viewEmployeeService in a EmployeeServices.java where i am getting values
from database and storing them in map.
while i am calling from service name from *EmployeeEvents *can i directly
call runsync without sending any map.??
Thanks