Hi Prabhakar,
The scenario you are given is not properly executed because, in this
case the second event(viewEmployee) doesn't works for either success or
failure of event(createEmployee). Thus to successfully execute this you
have to provide response 'type=request' for first event which on success
invoke's another requests and executes second event, and on success of
it the response goes to specified view.
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" value="submitSecond" />
</request-map>
<request-map uri="submitSecond">
<security https="false" auth="false" />
<event type="java" path="org.mindtree.testapp.EmployeeEvents"
invoke="viewEmployee"/>
<response name="success" type="view" value="main" />
</request-map>
Thanks& regards
--
Himanil Gupta,
Enterprise Software Developer
HotWax Media Pvt. Ltd. Indore
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