From: Mike S. <ms...@md...> - 2006-12-06 00:56:12
|
1) Why is AjaxRequestHandler not in in ERExtensions? We have this obnoxious problem of crossed dependencies. ERX has Ajax dependencies but it can't require Ajax framework, and Ajax framework has ERX extensions, but we have to be careful with ERX dependencies to not require ERXApplication, etc (so Ajax framework is usable in other places). AjaxRequestHandler, for the most part, does not HAVE to be in ERX, so it is not. ERXAjaxApplication and ERXAjaxSession HAVE to be in ERX because ERXApplication and ERXSession extend them. If I could, I'd move those into Ajax framework also, but it's not possible. Ajax framework SHOULD be as standalone as possible. 2) Can AjaxRequestHandler automatically configure an incoming request so it is handled by AjaxApplication and AjaxSession? I'm not sure what you mean on this one. This is basically the entire purpose of AjaxRequestHandler (it just calls AjaxUtils.updateMutableUserInfoWithAjaxInfo(request)). When you make a /ajax/whatever request, AjaxRequestHandler flags it as an ajax request so that it qualifies as an ajax request when the system calls ERXAjaxApplication.shouldNotStorePage(). The one case where this is made complicated is for forms. A form defines its action and that form could be submitted with ajax OR non-ajax, so we can't automatically make its url /ajax. This is the annoying extra case where an AjaxSubmitButton (or AjaxObserveField) add an AJAX_SUBMIT_BUTTON flag onto the query parameters. ERXAjaxApplication allows the existence of this key to also flag as an Ajax request. It should be MOSTLY rare that you run into a case of an ajax request that ends up NOT being handled as such. There are still a couple cases, and we basically only use prototype which adds a "_" query parameter that we could also look for, but I haven't wanted to tie us to prototype at that level, so I haven't added the check. ms On Dec 5, 2006, at 7:06 PM, Benoit Marchant wrote: > Hi > > Is there a reason why the AjaxRequestHandler as well as the code that > register it have no been added to ERExtentions when the > AjaxApplication and the AjaxSession have been? > Have some thoughts be given to make the AjaxRequestHandler > automatically configure an incoming request handled by it so that it > will be processed as an AJAX request by the AjaxApplication and the > AjaxSessions? > > Thanks, > > Benoit > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc |