-none- 2007-09-03 - By Leonidas Papadakis
Back Hi Marc,
if you are using struts2 , i guess that your action result is xslt (returning xml) . Normally when no errors occur you will parse this xml and populate the list with javascript. Why don't you set a flag on your xml result i.e.
<errorid>1</errorid> <errormessage>Invalid input</errormessage>
so that you will test for the value of errorid . If errorid > 0 do not run code that populates list ....
Regards,
Leonidas
Marc Eckart wrote: > Hi, > > I have no idea, how to handle ajax requests properly. My problem is, that I > want to fill a list - by now it's just a simple struts action as normal http > request. I now want that the list is filled with a ajax request so that the > whole page doesn't need to be loaded. But sometimes it is possible that the > action that is responsible to fill the list throws an exception or delivers > actionerrors/actionmessages. > > If the action returns actionerrors this should not displayed in the div tag > where the list is. Instead actionerrors are displayed in a different div > tag. Or another problem if an exception occurs the errorpage is displayed in > the div tag instead on a different error jsp. > > How can I deal with this situations? > > Any suggestions? > > Thanks in advance :-) > > Marc > >
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|